:root {
  --bg-canvas: #0b0b0d;
  --bg-surface: #1b1b20;
  --bg-surface-hover: #28282f;
  --text-primary: #f4f4f5;
  --text-muted: #c0c4cc;
  --accent-primary: #dc2626;
  --accent-secondary: #ef4444;
  --border-subtle: #656870;
  --shadow-silver: 4px 4px 0 #c0c4cc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, "Segoe UI", Roboto, -apple-system, sans-serif;
  line-height: 1.65;
  font-size: 1rem;
  overflow-wrap: anywhere;
  hyphens: auto;
  padding: clamp(0.75rem, 2vw, 2.5rem);
}

.site-frame {
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  top: -9999px;
  left: 0.5rem;
  background: var(--accent-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  font-weight: 700;
  text-decoration: none;
  z-index: 1000;
}
.skip-link:focus-visible {
  top: 0.5rem;
}

.top-tagline-bar {
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.35rem 1.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  background: #101014;
}

.site-header {
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-surface);
}

.brand-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.brand-logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  text-decoration: none;
  text-transform: uppercase;
}
.brand-logo span {
  color: var(--accent-primary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0.35rem 0.5rem;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover, .nav-link[aria-current="page"] {
  color: #fff;
  background-color: var(--bg-surface-hover);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.2rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  line-height: 1;
}

.mobile-nav-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 2px solid var(--accent-primary);
  z-index: 99;
  padding: 1rem;
}
.mobile-nav-panel.is-active {
  display: flex;
}
.mobile-nav-panel .nav-link {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #28282f;
}

.btn-crimson {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.65rem 1.25rem;
  text-decoration: none;
  border: 1px solid #ffffff;
  border-radius: 0;
  box-shadow: var(--shadow-silver);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn-crimson:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #c0c4cc;
}
.btn-crimson:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 transparent;
}

.btn-crimson-ghost {
  background-color: transparent;
  border: 1px solid var(--border-subtle);
  box-shadow: 2px 2px 0 var(--border-subtle);
  color: var(--text-primary);
}
.btn-crimson-ghost:hover {
  border-color: #fff;
  background: var(--bg-surface-hover);
}

main {
  flex: 1;
  padding-bottom: 3rem;
}

.hero-block {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  background: #000;
}
@media (min-width: 900px) {
  .hero-block {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero-visual {
  position: relative;
  min-height: 380px;
  background: #141419;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(110%) brightness(85%);
  border-radius: 0;
}

.hero-content {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
}

.hero-kicker {
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

h1, h2, h3, h4 {
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 58ch;
}

.floating-fact-panel {
  border: 1px solid var(--border-subtle);
  background: #111115;
  padding: 1.25rem;
  border-radius: 0;
  margin-top: 1.5rem;
}
.fact-panel-title {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}
.fact-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.fact-list li {
  font-size: 0.86rem;
  color: var(--text-muted);
}
.fact-list li strong {
  color: #fff;
}

.editorial-rail-container {
  display: flex;
  flex-direction: column;
}

.editorial-section {
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 3.5vw, 3rem);
}
.editorial-section:last-child {
  border-bottom: none;
}

.section-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
}
@media (max-width: 680px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.section-rail {
  border-right: 1px solid var(--border-subtle);
  padding-right: 1rem;
}
@media (max-width: 680px) {
  .section-rail {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
  }
}

.section-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-primary);
  line-height: 1;
  letter-spacing: -0.05em;
}
.section-meta-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: block;
  margin-top: 0.35rem;
}

.section-body {
  max-width: 78ch;
}
.section-body h2 {
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  margin-bottom: 0.85rem;
}
.section-body p {
  color: var(--text-muted);
  margin-bottom: 1.15rem;
}

.recipe-list-rows {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.recipe-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid #28282f;
  transition: background 0.15s ease;
}
.recipe-row:hover {
  background-color: var(--bg-surface-hover);
}
@media (max-width: 600px) {
  .recipe-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.method-icon {
  width: 44px;
  height: 44px;
  background: #111114;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.recipe-info h3 {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.recipe-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.texture-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  background: #121216;
  white-space: nowrap;
}

.data-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
}
table.editorial-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}
table.editorial-table th {
  background: #16161c;
  color: #fff;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
table.editorial-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #28282f;
  color: var(--text-muted);
}
table.editorial-table tr:hover td {
  background: var(--bg-surface-hover);
  color: #fff;
}

.checkpoint-block {
  border-left: 3px solid var(--accent-primary);
  background: var(--bg-surface);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.checkpoint-block h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.checkpoint-block p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.article-visual-strip {
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.article-visual-strip figure {
  border: 1px solid var(--border-subtle);
  background: #121217;
}
.article-visual-strip img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.article-visual-strip figcaption {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

.troubleshoot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.troubleshoot-branch {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 1.25rem;
}
.troubleshoot-branch .fail-symptom {
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #0d0d10;
  padding: 2.5rem clamp(1rem, 3.5vw, 3rem) 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-column h5 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.85rem;
}
.footer-column ul {
  list-style: none;
  display: grid;
  gap: 0.4rem;
}
.footer-column a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-column a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-legal-bar {
  border-top: 1px solid #28282f;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
}

.tool-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.tool-box label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  color: #fff;
}
.tool-box input, .tool-box select, .tool-box textarea {
  width: 100%;
  padding: 0.65rem;
  background: #0b0b0d;
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.tool-box input:focus, .tool-box select:focus, .tool-box textarea:focus {
  outline: 2px solid var(--accent-primary);
  border-color: #fff;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.output-preview {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #0b0b0d;
  border: 1px dashed var(--border-subtle);
  min-height: 90px;
  white-space: pre-wrap;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: monospace;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
