/* Medieval Forge Iron & Ember Theme for blacksmithmastersteam.wiki */
:root {
  --forge-950: #121215;
  --forge-900: #18181b;
  --forge-800: #27272a;
  --forge-700: #3f3f46;
  --stone-bg: #f4f4f5;
  --stone-card: #ffffff;
  --stone-tint: #f8fafc;
  --ink: #18181b;
  --ink-muted: #52525b;
  --ember: #b91c1c;
  --ember-hover: #991b1b;
  --brass-light: #fbbf24;
  --brass-dark: #9a3412;
  --border-light: #e4e4e7;
  --border-dark: rgba(255, 255, 255, 0.14);
  --radius: 12px;
  --shadow-sm: 0 2px 6px rgba(24, 24, 27, 0.06);
  --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.34);
  --font-heading: "Cinzel", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--stone-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  overflow-x: clip;
}

picture { display: block; }
img { max-width: 100%; height: auto; display: block; border-radius: 10px; }
a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-heading); color: var(--ink); line-height: 1.25; margin: 0 0 14px; }
h1 { font-size: clamp(28px, 3.8vw, 44px); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(22px, 2.5vw, 28px); margin-top: 48px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
h3 { font-size: 19px; margin-top: 24px; font-family: var(--font-body); font-weight: 700; }

.skip-link {
  position: fixed; left: 16px; top: -100px; z-index: 60;
  background: var(--brass-light); color: var(--forge-950);
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 14px; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  background: var(--forge-900);
  border-bottom: 1px solid var(--border-dark);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--forge-800);
  border: 1px solid rgba(251, 191, 36, 0.32);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-heading); font-size: 17px; font-weight: 700; color: #ffffff; letter-spacing: 0.02em; }
.brand-text small { font-size: 12px; color: var(--brass-light); font-weight: 600; margin-top: 2px; }

.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { color: #e4e4e7; font-size: 14px; font-weight: 600; padding: 6px 2px; white-space: nowrap; }
.site-nav a:hover { color: var(--brass-light); text-decoration: none; }

.nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  background: var(--forge-800);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--brass-light); background: var(--forge-700); }
.nav-toggle-icon { display: block; flex-shrink: 0; }

/* Forge Hero */
.forge-hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(185, 28, 28, 0.22), transparent 48%),
    radial-gradient(circle at 12% 85%, rgba(251, 191, 36, 0.10), transparent 42%),
    linear-gradient(160deg, var(--forge-950) 0%, var(--forge-900) 58%, #221c1d 100%);
  color: #f4f4f5;
  padding: 48px 0 54px;
  border-bottom: 3px solid var(--ember);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 36px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.34);
  color: var(--brass-light);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brass-light); flex-shrink: 0; }
.forge-hero h1 { color: #ffffff; margin-bottom: 14px; }
.hero-lead { color: #d4d4d8; font-size: 17px; line-height: 1.68; margin: 0 0 14px; max-width: 60ch; }
.hero-short-answer { color: #e4e4e7; font-size: 15.5px; line-height: 1.65; margin: 0 0 22px; max-width: 62ch; }
.hero-short-answer strong { color: var(--brass-light); }

.engage-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 24px; }
.engage-secondary { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-primary, .btn-outline-light, .btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--ember); color: #ffffff; }
.btn-primary:hover { background: var(--ember-hover); text-decoration: none; }
.btn-outline-light { background: rgba(255, 255, 255, 0.08); color: #ffffff; border-color: rgba(255, 255, 255, 0.28); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.16); text-decoration: none; }
.btn-ghost-light { background: transparent; color: #e4e4e7; border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost-light:hover { border-color: var(--brass-light); color: var(--brass-light); }
.share-msg { font-size: 13px; color: var(--brass-light); font-weight: 600; }

.spec-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 0;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}
.spec-strip dt { font-size: 13px; color: #c9c9ce; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; font-weight: 600; }
.spec-strip dd { margin: 0; font-size: 14px; font-weight: 700; color: #ffffff; line-height: 1.35; }

.hero-showcase { display: flex; flex-direction: column; gap: 12px; }
.showcase-frame {
  margin: 0;
  background: var(--forge-800);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.showcase-frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0; }
.showcase-frame figcaption { padding: 10px 14px; font-size: 13px; color: #d4d4d8; background: var(--forge-900); border-top: 1px solid var(--border-dark); }

.shot-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.shot-thumb {
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--forge-800);
  overflow: hidden;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.shot-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0; opacity: 0.68; transition: opacity 0.15s ease; }
.shot-thumb:hover img, .shot-thumb.is-active img { opacity: 1; }
.shot-thumb.is-active {
  border-color: var(--brass-light);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35);
}

/* Editorial Reading Shell */
.reading-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  padding-top: 34px;
  padding-bottom: 56px;
  align-items: start;
}
.smith-rail { position: sticky; top: 88px; }
.rail-card {
  background: var(--stone-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.rail-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.rail-sub { margin-top: 18px; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--ink-muted);
  font-size: 13.5px;
  font-weight: 600;
}
.rail-nav a span { color: var(--brass-dark); font-size: 12px; font-weight: 700; }
.rail-nav a:hover { background: var(--stone-bg); color: var(--ember); text-decoration: none; }
.rail-note {
  margin-top: 16px;
  padding: 12px;
  border-left: 3px solid var(--ember);
  background: var(--stone-tint);
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}
.rail-note strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 12.5px; }
.rail-note p { margin: 0; }

.reading-main { min-width: 0; display: flex; flex-direction: column; gap: 26px; }

.prose-card, .comments-card {
  background: var(--stone-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.last-updated {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.prose-card > h2:first-child,
.prose-card > .last-updated + h2 { margin-top: 0; }
.prose-card p, .prose-card li { max-width: 720px; color: #27272a; }
.prose-card ul, .prose-card ol { padding-left: 22px; }
.prose-card li { margin-bottom: 8px; }
.prose-card figure { margin: 24px 0; background: var(--stone-tint); border: 1px solid var(--border-light); border-radius: 10px; padding: 10px; max-width: 720px; }
.prose-card figure img { width: 100%; border-radius: 8px; }
.prose-card figcaption { font-size: 13px; color: var(--ink-muted); margin-top: 8px; }

/* Fact Cards Grid */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 26px;
}
.fact-box {
  background: var(--stone-tint);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--ember);
  border-radius: 10px;
  padding: 16px;
}
.fact-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--ink);
}
.fact-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* Two-Column Comparison Grid */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 24px;
}
.compare-col {
  background: var(--stone-tint);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--ember);
  border-radius: 10px;
  padding: 18px;
}
.compare-col h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--ink);
}
.compare-col ul {
  margin: 0;
  padding-left: 18px;
}
.compare-col li {
  font-size: 14.5px;
  margin-bottom: 6px;
}

/* Responsive Table */
.table-scroll { width: 100%; overflow-x: auto; margin: 22px 0; border: 1px solid var(--border-light); border-radius: 10px; }
.prose-card table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.prose-card th, .prose-card td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: top; }
.prose-card th { background: var(--forge-900); color: #ffffff; font-weight: 700; font-size: 13.5px; }
.prose-card tr:last-child td { border-bottom: 0; }

/* FAQ Accordion */
.faq-card h2, .inner-faq h2 { margin-top: 0; }
.inner-faq { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border-light); }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border-light); padding: 14px 0; }
.faq-item:last-child { border-bottom: 0; padding-bottom: 0; }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  list-style: none;
  padding-right: 28px;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 0;
  color: var(--ember);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.faq-item[open] summary::after { content: "-"; }
.faq-item p { margin: 10px 0 0; color: var(--ink-muted); font-size: 15px; }

/* Related Guides Box */
.related-guides {
  margin-top: 32px;
  padding: 20px;
  background: var(--stone-tint);
  border: 1px solid var(--border-light);
  border-radius: 10px;
}
.related-guides h2 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  font-size: 19px;
}
.related-guides ul { margin: 0; padding-left: 20px; }

/* Comments */
.comments-card h2 { margin-top: 0; }
.comments-intro { font-size: 14.5px; color: var(--ink-muted); margin: 0 0 18px; }
.comment-form { display: grid; gap: 12px; max-width: 640px; margin-bottom: 22px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d4d4d8;
  background: var(--stone-tint);
  color: var(--ink);
  font: inherit;
}
.comment-item { padding: 14px 0; border-top: 1px solid var(--border-light); }
.comment-meta { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-muted); margin-bottom: 6px; }
.owner-badge { background: var(--ember); color: #ffffff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }

/* Legal & Secondary Pages */
.page-shell { padding-top: 34px; padding-bottom: 64px; }
.page-article { max-width: 860px; margin: 0 auto; }
.breadcrumb { font-size: 13.5px; color: var(--ink-muted); margin-bottom: 14px; }

/* Footer */
.site-footer {
  background: var(--forge-900);
  color: #d4d4d8;
  border-top: 3px solid var(--ember);
  padding: 36px 0;
  font-size: 14px;
}
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-about { max-width: 560px; }
.footer-logo { font-family: var(--font-heading); font-size: 18px; font-weight: 700; color: #ffffff; margin-bottom: 8px; }
.footer-desc, .footer-copy { margin: 0 0 8px; color: #a1a1aa; font-size: 13.5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.footer-links a { color: #e4e4e7; font-weight: 600; font-size: 14px; }
.footer-links a:hover { color: var(--brass-light); text-decoration: none; }

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brass-light);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .hero-layout { grid-template-columns: 1fr; }
  .reading-shell { grid-template-columns: 1fr; }
  .smith-rail { position: static; }
  .rail-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-grid, .compare-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .forge-hero { padding: 28px 0 36px; }
  .prose-card, .comments-card { padding: 20px 18px; }
  h2 { margin-top: 36px; }
  .spec-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 12px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 70px;
    background: var(--forge-900);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 16px;
    border-bottom: 1px solid var(--border-dark);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--border-dark); }
  .engage-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .engage-bar > .btn-primary { width: 100%; }
  .engage-secondary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .engage-secondary .btn-outline-light,
  .engage-secondary .btn-ghost-light {
    width: 100%;
    padding: 0 8px;
    font-size: 13.5px;
    font-weight: 600;
  }
  .rail-nav { grid-template-columns: 1fr; }
}
