/* =========================================================
   Lab: Ironclad Fitness copy before-and-after
   Before: a generic template. After: Ironclad's real brand
   (bone, iron, electric blue, condensed type).
   ========================================================= */

.cp { display: grid; gap: 16px; }
.cp [hidden] { display: none !important; }
.cp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.cp-seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.cp-seg button { padding: 8px 14px; border: 0; border-radius: 4px; background: none; color: var(--muted); font: 600 0.88rem/1 var(--body); cursor: pointer; }
.cp-seg button[aria-pressed="true"] { background: rgba(201, 162, 75, 0.18); color: var(--gold-bright); }
.cp-notes-switch { margin-left: auto; }
@media (max-width: 640px) { .cp-notes-switch { margin-left: 0; } }

.cp-main { display: grid; gap: 16px; }
@media (min-width: 1100px) { .cp-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.cp-main > * { min-width: 0; }

/* ---------- The stage: both pages share one grid cell ---------- */
.cp-stage {
  position: relative;
  display: grid;
  height: min(78vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  scrollbar-width: thin;
}
.cp-layer { grid-area: 1 / 1; min-width: 0; }
.cp-after { clip-path: inset(0 0 0 var(--pos)); }
[data-mode="before"] .cp-after { clip-path: inset(0 0 0 100%); }
[data-mode="after"] .cp-after { clip-path: inset(0 0 0 0); }
[data-mode="after"] .cp-before { visibility: hidden; }
.cp-frame { --pos: 50%; position: relative; }
.cp-handle {
  position: absolute; top: 0; bottom: 0;
  left: var(--pos);
  z-index: 5;
  width: 0;
  outline: none;
}
[data-mode="before"] .cp-handle, [data-mode="after"] .cp-handle { display: none; }
.cp-handle::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--gold-bright); box-shadow: 0 0 14px rgba(232, 200, 115, 0.8); }
.cp-grip {
  position: absolute; left: 0; top: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: #0b0a08; border: 2px solid var(--gold-bright);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  cursor: ew-resize; touch-action: none;
}
.cp-grip::before, .cp-grip::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-left: 2px solid var(--gold-bright); border-bottom: 2px solid var(--gold-bright); }
.cp-grip::before { left: 9px; transform: translateY(-50%) rotate(45deg); }
.cp-grip::after { right: 9px; transform: translateY(-50%) rotate(-135deg); }
.cp-handle:focus-visible .cp-grip { box-shadow: 0 0 0 4px rgba(232, 200, 115, 0.45); }
.cp-handle { touch-action: none; cursor: ew-resize; }
.cp-handle::after { content: ""; position: absolute; left: -22px; width: 44px; top: 0; bottom: 0; }
.cp-tag {
  position: absolute; top: 14px;
  padding: 5px 10px; border-radius: 3px;
  background: #0b0a08; color: var(--gold-bright);
  font: 600 0.7rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  pointer-events: none;
}
.cp-tag.l { right: 10px; }
.cp-tag.r { left: 10px; }
.dragging .cp-stage { user-select: none; }

/* ---------- Before: a generic template ---------- */
.bf { min-height: 100%; background: #fff; color: #333; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.5; text-align: center; }
.bf-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding: 14px 16px; border-bottom: 1px solid #e5e5e5; font-size: 0.85rem; color: #555; }
.bf-nav b { margin-right: auto; color: #111; letter-spacing: 0.04em; }
.bf-hero { padding: 64px 24px 72px; background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), repeating-linear-gradient(135deg, #6b7280 0 18px, #737a86 18px 36px); color: #fff; }
.bf-hero h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: 0.02em; }
.bf-hero p { max-width: 520px; margin: 0 auto 22px; font-size: 1.05rem; }
.bf-btn { display: inline-block; padding: 11px 26px; border-radius: 4px; background: #0d6efd; color: #fff; font-weight: 700; }
.bf-sec { padding: 44px 24px; }
.bf-sec.alt { background: #f5f5f5; }
.bf-sec h3 { margin: 0 0 18px; font-size: 1.6rem; color: #111; }
.bf-sec > p { max-width: 560px; margin: 0 auto 18px; }
.bf-cols { display: grid; gap: 22px; max-width: 900px; margin: 0 auto; }
@media (min-width: 760px) { .bf-cols { grid-template-columns: repeat(3, 1fr); } }
.bf-cols i { display: block; width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; background: #dbe7ff; }
.bf-cols h4 { margin: 0 0 8px; font-size: 1.05rem; color: #111; }
.bf-cols p { margin: 0; font-size: 0.9rem; color: #666; }
.bf-foot { padding: 24px; background: #222; color: #aaa; font-size: 0.8rem; }

/* ---------- After: Ironclad's brand ---------- */
.af {
  --ic-bone: #efebe3; --ic-iron: #17191c; --ic-blue: #2f5bff; --ic-text: #2a2d31; --ic-muted: #6b6f75; --ic-line: #d9d3c7;
  min-height: 100%;
  background: var(--ic-bone); color: var(--ic-text);
  font-family: "Archivo", system-ui, sans-serif; font-size: 15.5px; line-height: 1.55;
}
.af-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 14px clamp(16px, 4vw, 40px); font-size: 0.86rem; font-weight: 600; color: var(--ic-muted); }
.af-nav b { margin-right: auto; font-family: "Big Shoulders Display", "Archivo", sans-serif; font-weight: 900; font-size: 1.5rem; letter-spacing: 0.04em; color: var(--ic-iron); }
.af-pill { padding: 8px 14px; border-radius: 999px; background: var(--ic-iron); color: #fff; }
.af-hero { padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 40px) 36px; }
.af-eyebrow { margin: 0 0 14px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ic-blue); }
.af h2 { position: relative; margin: 0; max-width: 14ch; font-family: "Big Shoulders Display", "Archivo", sans-serif; font-weight: 900; font-size: clamp(2.6rem, 7vw, 4.8rem); line-height: 0.95; text-transform: uppercase; color: var(--ic-iron); letter-spacing: 0.005em; }
.af-lede { position: relative; max-width: 58ch; margin: 18px 0 0; font-size: 1.08rem; color: var(--ic-text); }
.af-cta { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 24px; }
.af-btn { display: inline-block; padding: 14px 22px; border-radius: 4px; background: var(--ic-blue); color: #fff; font-weight: 700; letter-spacing: 0.02em; }
.af-cta small { color: var(--ic-muted); font-size: 0.88rem; }
.af-facts { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 0 clamp(16px, 4vw, 40px); padding: 0; list-style: none; border-top: 2px solid var(--ic-iron); border-bottom: 2px solid var(--ic-iron); }
@media (min-width: 900px) { .af-facts { grid-template-columns: repeat(4, 1fr); } }
.af-facts li { display: grid; padding: 14px 12px 14px 0; }
.af-facts b { font-family: "Big Shoulders Display", sans-serif; font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--ic-iron); }
.af-facts span { font-size: 0.86rem; color: var(--ic-muted); }
.af-sec { position: relative; padding: 30px clamp(16px, 4vw, 40px) 4px; max-width: 760px; }
.af h3 { position: relative; margin: 0 0 10px; font-family: "Big Shoulders Display", "Archivo", sans-serif; font-weight: 700; font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.05; text-transform: uppercase; color: var(--ic-iron); }
.af-sec p { margin: 0; }
.af-not { margin-top: 18px; padding-bottom: 22px; border-left: 4px solid var(--ic-blue); margin-left: clamp(16px, 4vw, 40px); padding-left: 18px; }
.af-founder { position: relative; margin: 26px clamp(16px, 4vw, 40px) 0; padding: 22px 24px; border-radius: 6px; background: var(--ic-iron); color: #f1eee8; }
.af-founder blockquote { margin: 0; font-size: 1.08rem; line-height: 1.55; }
.af-founder figcaption { margin-top: 10px; color: #a9b4ff; font-weight: 600; font-size: 0.88rem; }
.af-faq dl { margin: 0; display: grid; gap: 2px; }
.af-faq dt { position: relative; margin-top: 12px; font-weight: 700; color: var(--ic-iron); }
.af-faq dd { margin: 2px 0 0; color: var(--ic-text); }
.af-close { padding: 34px clamp(16px, 4vw, 40px) 44px; margin-top: 26px; background: var(--ic-iron); color: #fff; }
.af-close h3 { color: #fff; max-width: 22ch; margin-bottom: 18px; }

/* Note markers */
.ic-m {
  position: absolute; left: -12px; top: -12px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: #0b0a08; color: #e8c873; border: 1.5px solid #e8c873;
  font: 700 0.72rem/1 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: 0; text-transform: none;
  cursor: help;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.af-hero .ic-m, .af-sec .ic-m { left: -14px; }
@media (max-width: 640px) { .ic-m { left: -6px; } .af-hero .ic-m, .af-sec .ic-m { left: -6px; } }
.af h3 .ic-m, .af-faq dt .ic-m { position: relative; left: 0; top: -0.2em; display: inline-grid; margin-right: 8px; vertical-align: middle; }
.af h2 .ic-m { left: -8px; top: -14px; }
.notes-off .ic-m { display: none; }
.ic-hl { outline: 3px solid #e8c873; outline-offset: 6px; border-radius: 4px; transition: outline-color 200ms; }

/* ---------- Notes panel ---------- */
.cp-side { min-width: 0; }
@media (min-width: 1100px) { .cp-side { position: sticky; top: calc(var(--header-h) + 16px); } }
.notes-off .cp-notes-panel { display: none; }
.cp-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; max-height: min(78vh, 760px); overflow-y: auto; padding-right: 4px; }
@media (max-width: 1099px) { .cp-notes { max-height: none; grid-template-columns: 1fr; } }
@media (min-width: 700px) and (max-width: 1099px) { .cp-notes { grid-template-columns: 1fr 1fr; } }
.cp-notes li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--panel); cursor: pointer; transition: border-color 200ms, background 200ms; }
.cp-notes li:hover, .cp-notes li.on { border-color: var(--gold); background: #15120c; }
.cp-notes .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-bright); color: #060606; font-weight: 700; font-size: 0.78rem; }
.cp-notes b { display: block; font-weight: 600; color: var(--ivory); font-size: 0.96rem; }
.cp-notes p { margin: 3px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

/* ---------- Metrics ---------- */
.cp-metrics { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: clamp(18px, 3vw, 28px); }
.cp-metrics-head h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2rem); }
.cp-metrics-head p { margin: 6px 0 16px; color: var(--muted); font-size: 0.92rem; }
.cp-table-wrap { overflow-x: auto; }
.cp-table { width: 100%; min-width: 520px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cp-table th, .cp-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.cp-table thead th { color: var(--muted); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.cp-table tbody th { font-weight: 600; color: var(--ivory); }
.cp-table small { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.cp-table small.cl { color: #e07a5f; max-width: 30ch; }
.cp-table td { color: var(--muted); }
.cp-table td.win { color: var(--gold-bright); font-weight: 600; }
.cp-table td.win::after { content: " ✓"; }
.cp-table tr:last-child th, .cp-table tr:last-child td { border-bottom: 0; }

/* Every child of the demo may shrink to the screen */
.cp > *, .cp-bar > *, .cp-browser, .cp-stage > * { min-width: 0; }
.cp-browser { overflow: hidden; }

/* ---------- Notes switch ---------- */
.cp-notes-seg { margin-left: auto; align-items: center; }
.cp-seg-label { padding: 0 8px 0 6px; color: var(--muted); font: 600 0.72rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; }
@media (max-width: 640px) { .cp-notes-seg { margin-left: 0; } }
[data-notes="off"] .cp-side { display: none; }
@media (min-width: 1100px) { [data-notes="off"] .cp-main { grid-template-columns: minmax(0, 1fr); } }
.cp-seo-only { display: none; }
[data-notes="seo"] .cp-seo-only { display: grid; }
[data-notes="seo"] p.cp-seo-only { display: flex; }
[data-notes="seo"] .cp-copy-only { display: none; }

/* Markers: copy notes (numbers) and SEO notes (S1, S2...) */
.ic-s {
  position: absolute; left: -14px; top: -12px; z-index: 2;
  display: none; place-items: center;
  min-width: 28px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: #e8c873; color: #060606;
  font: 700 0.7rem/1 "Familjen Grotesk", system-ui, sans-serif; letter-spacing: 0; text-transform: none;
  cursor: help; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
[data-notes="seo"] .ic-s { display: grid; }
[data-notes="seo"] .ic-m, [data-notes="off"] .ic-m { display: none; }
.af h3 .ic-s { position: relative; left: 0; top: -0.2em; display: none; margin-right: 8px; vertical-align: middle; }
[data-notes="seo"] .af h3 .ic-s { display: inline-grid; }
@media (max-width: 640px) { .ic-s { left: -6px; } }

/* In SEO view, every heading shows the tag Google reads it as */
[data-notes="seo"] [data-tag] { position: relative; }
[data-notes="seo"] [data-tag]::after {
  content: attr(data-tag);
  display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 3px;
  background: #0b0a08; color: #e8c873;
  font: 700 0.62rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.04em;
  vertical-align: middle; text-transform: none;
}
[data-notes="seo"] .af-eyebrow[data-tag] { outline: 2px dashed #2f5bff; outline-offset: 4px; }

/* After: the big display line (no longer the H1) and internal links */
.af-display { position: relative; margin: 0; max-width: 14ch; font-family: "Big Shoulders Display", "Archivo", sans-serif; font-weight: 900; font-size: clamp(2.6rem, 7vw, 4.8rem); line-height: 0.95; text-transform: uppercase; color: var(--ic-iron); letter-spacing: 0.005em; }
.af-eyebrow { position: relative; }
.af-links { position: relative; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px clamp(16px, 4vw, 40px) 0; padding: 12px 0; border-top: 1px solid var(--ic-line); border-bottom: 1px solid var(--ic-line); }
.ic-link { color: var(--ic-blue); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- What Google sees ---------- */
.cp-google { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: clamp(18px, 3vw, 28px); display: grid; gap: 18px; }
.cp-google .cp-metrics-head p { margin-bottom: 0; }
.cp-serps, .cp-outlines { display: grid; gap: 14px; }
@media (min-width: 900px) { .cp-serps, .cp-outlines { grid-template-columns: 1fr 1fr; } }
.cp-serps > *, .cp-outlines > * { min-width: 0; }
.cp-serp-label { display: block; margin-bottom: 8px; font: 600 0.72rem/1 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-bright); }
.cp-serp .g { padding: 16px 18px; border-radius: 8px; background: #fff; color: #202124; font-family: Arial, Helvetica, sans-serif; }
.g-site { display: flex; align-items: center; gap: 10px; }
.g-site i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #f1f3f4; color: #17191c; font: 900 0.8rem/1 Arial, sans-serif; font-style: normal; }
.g-site b { display: block; font-size: 0.85rem; font-weight: 400; color: #202124; }
.g-site small { display: block; font-size: 0.76rem; color: #4d5156; }
.g-title { display: block; margin-top: 8px; font-size: 1.2rem; font-weight: 400; line-height: 1.3; color: #1a0dab; }
.g-desc { margin: 4px 0 0; font-size: 0.88rem; line-height: 1.55; color: #4d5156; }
.g-checks { display: grid; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.84rem; }
.g-checks li::before { margin-right: 6px; font-weight: 700; }
.g-checks .ok { color: #9fd49a; }
.g-checks .ok::before { content: "✓"; }
.g-checks .no { color: #e07a5f; }
.g-checks .no::before { content: "✕"; }
.cp-outline ol { margin: 0; padding: 12px 14px; list-style: none; border: 1px solid var(--line-soft); border-radius: 6px; background: #0b0a08; display: grid; gap: 6px; font-size: 0.9rem; }
.cp-outline li { display: flex; gap: 10px; align-items: baseline; color: var(--ivory); }
.cp-outline li span { flex: none; width: 28px; padding: 2px 0; border-radius: 3px; background: rgba(201, 162, 75, 0.16); color: var(--gold-bright); font: 700 0.66rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-align: center; }
.cp-outline li.lv2 { padding-left: 16px; }
.cp-outline li.lv3 { padding-left: 32px; color: var(--muted); }
.cp-schema { margin-top: 0; }
.cp-pulse { animation: cp-pulse 1.4s ease-out; }
@keyframes cp-pulse { from { box-shadow: 0 0 0 4px rgba(232, 200, 115, 0.8); } to { box-shadow: 0 0 0 4px rgba(232, 200, 115, 0); } }
.cp-notes .n.s { background: transparent; border: 1.5px solid var(--gold-bright); color: var(--gold-bright); font-size: 0.68rem; }

/* Table group heading */
.cp-table tr.grp th { padding-top: 22px; color: var(--gold-bright); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.af-eyebrow .ic-s { left: -36px; top: -4px; }
@media (max-width: 640px) { .af-eyebrow .ic-s { left: 0; top: -26px; } }
