/* ============================================================
   fobproto.com — patch.css
   Covers classes used across the site but not defined in main.css.
   Loaded AFTER main.css so it composes with existing tokens.
   ============================================================ */

/* ============ BRAND / NAV ============ */
.brand-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: baseline;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
}

.nav-links a:hover { color: var(--accent); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 1rem 2rem;
}

/* ============ BUTTONS (all variants) ============ */
.btn {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}

.btn-primary-lg {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid var(--accent);
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
}

.btn-primary-lg:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-primary-light {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid var(--bg);
  transition: all 0.15s ease;
}

.btn-primary-light:hover {
  background: transparent;
  color: var(--bg);
  border-color: var(--bg);
}

.btn-outline-light {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--bg);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid rgba(244, 242, 236, 0.3);
  transition: all 0.15s ease;
}

.btn-outline-light:hover {
  border-color: var(--bg);
  background: rgba(244, 242, 236, 0.05);
}

.btn-outline {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid var(--ink);
  transition: all 0.15s ease;
}

.btn-outline:hover { background: var(--ink); color: var(--bg); }

.btn-accent {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid var(--accent);
  transition: all 0.15s ease;
}

.btn-accent:hover { background: var(--accent-dark); }

.btn-inline {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}

.btn-inline:hover { color: var(--accent-dark); }

.btn-toc {
  display: inline-block;
  padding: 0.625rem 1rem;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--rule);
  text-align: center;
  transition: all 0.15s ease;
}

.btn-toc:hover { border-color: var(--ink); }

.cta-btn-lg {
  display: inline-block;
  padding: 1.125rem 2.25rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 500;
  border: 1px solid var(--accent);
  transition: all 0.15s ease;
}

.cta-btn-lg:hover { background: var(--accent-dark); }

/* ============ SPEC PANEL (used on all material page headers) ============ */
.spec-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  align-self: start;
}

.spec-panel-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--ink-subtle);
  text-transform: uppercase;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--rule);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.spec-row > span:first-child {
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.spec-row > span:last-child {
  color: var(--ink);
  font-weight: 500;
}

.spec-row-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-subtle);
  text-transform: uppercase;
}

/* ============ TOC SIDEBAR (material pages, guide pages) ============ */
.toc-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.toc-label,
.on-this-page-label,
.otp-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--ink-subtle);
  text-transform: uppercase;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1rem;
}

.on-this-page-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0 0 1rem;
  color: var(--ink);
}

.toc-list,
.on-this-page ol,
.on-this-page ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.toc-list li,
.on-this-page li {
  padding: 0.375rem 0;
  font-size: 0.875rem;
}

.toc-list a,
.on-this-page a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.toc-list a:hover,
.on-this-page a:hover { color: var(--accent); }

.on-this-page {
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}

.toc-cta {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-dark);
  color: var(--bg);
}

.toc-cta-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: rgba(244, 242, 236, 0.6);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.toc-cta p {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  color: rgba(244, 242, 236, 0.85);
}

/* ============ QUOTE SIDEBAR (used on mat pages) ============ */
.quote-sidebar {
  padding: 1.5rem;
  background: var(--bg-dark);
  color: var(--bg);
  margin-top: 1.5rem;
}

.quote-sidebar h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  color: var(--bg);
}

.quote-sidebar p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(244, 242, 236, 0.85);
  margin: 0 0 1rem;
}

/* ============ SIDEBAR CTA (variant) ============ */
.sidebar-cta {
  padding: 1.5rem;
  background: var(--bg-dark);
  color: var(--bg);
  margin-top: 1.5rem;
}

.sidebar-cta-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: rgba(244, 242, 236, 0.6);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.sidebar-cta-btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.75rem;
}

.sidebar-cta-btn:hover { background: var(--accent-dark); }

/* ============ REASON LIST (why this material) ============ */
.reason-list {
  margin: 2rem 0;
}

.reason {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px dashed var(--rule);
}

.reason:last-child { border-bottom: 1px dashed var(--rule); }

.reason-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--accent);
  height: fit-content;
  align-self: start;
  min-width: 36px;
  text-align: center;
}

.reason h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.reason p {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ============ APPLICATIONS GRID ============ */
.app-grid,
.application-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 2rem 0;
}

.app-card,
.application-card {
  background: var(--bg-elevated);
  padding: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink);
}

.app-card strong,
.application-card strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

/* ============ FINISH CARDS (surface finish grid) ============ */
.finish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 2rem 0;
}

.finish-card {
  background: var(--bg-elevated);
  padding: 1.5rem;
}

.finish-card h4,
.fc-name,
.finish-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  margin: 0 0 0.375rem;
  color: var(--ink);
}

.fc-ra,
.finish-ra {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 0.625rem;
  letter-spacing: 0.02em;
}

.fc-note {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ============ MATERIAL CROSS-LINKS (related materials) ============ */
.material-cross {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 2rem 0;
}

.mc-card {
  background: var(--bg-elevated);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
  display: block;
}

.mc-card:hover { background: var(--bg); }

.mc-label,
.mc-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--ink-subtle);
  text-transform: uppercase;
  margin-bottom: 0.375rem;
}

.mc-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--ink);
  font-weight: 500;
}

/* ============ CROSS-LINK GRID (used on many pages) ============ */
.cross-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 2rem 0;
}

.cross-link {
  background: var(--bg-elevated);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
  display: block;
}

.cross-link:hover { background: var(--bg); }

.cross-link-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--ink-subtle);
  text-transform: uppercase;
  margin-bottom: 0.375rem;
}

.cross-link-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--ink);
  font-weight: 500;
}

.cross-link-card {
  background: var(--bg-elevated);
  padding: 1.5rem;
  border: 1px solid var(--rule);
}

/* ============ CTA BLOCK (multiple variants in use) ============ */
.cta-block {
  padding: 4rem 0;
  background: var(--bg-dark);
  color: var(--bg);
}

.cta-inner,
.cta-block-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.cta-grid h2 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  line-height: 1.2;
  color: var(--bg);
  margin: 0.5rem 0 1rem;
}

.cta-grid p {
  color: rgba(244, 242, 236, 0.8);
  line-height: 1.6;
  margin: 0;
}

.cta-label,
.cta-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(244, 242, 236, 0.6);
  text-transform: uppercase;
  display: block;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-self: end;
  justify-self: end;
}

.cta-mini {
  padding: 2.5rem;
  background: var(--bg-dark);
  color: var(--bg);
  text-align: left;
}

.cta-mini h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--bg);
  margin: 0.5rem 0 0.75rem;
}

.cta-mini p {
  color: rgba(244, 242, 236, 0.8);
  margin: 0 0 1rem;
}

@media (max-width: 768px) {
  .cta-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .cta-actions { justify-self: start; }
}

/* ============ DARK CTA (alt variant used in a few places) ============ */
.dark-cta {
  background: var(--bg-dark);
  color: var(--bg);
  padding: 2rem;
  margin: 2rem 0;
}

.dark-cta-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(244, 242, 236, 0.6);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.dark-cta p {
  color: rgba(244, 242, 236, 0.85);
  margin: 0 0 1rem;
}

/* ============ CALLOUT VARIANTS ============ */
.callout-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.callout-info {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
}

.callout-warn {
  background: #FCF0E8;
  border-left: 3px solid var(--warn);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
}

/* ============ TOLERANCE CARDS ============ */
.tolerance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 2rem 0;
}

.tolerance-card {
  background: var(--bg-elevated);
  padding: 1.5rem;
}

.tolerance-label,
.tc-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--ink-subtle);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.tolerance-value,
.tc-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
  line-height: 1;
}

.tc-note {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .tolerance-grid { grid-template-columns: 1fr; }
}

/* ============ FAQ BODY ============ */
.faq-body {
  padding: 1rem 0 0;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* ============ H2 SPEC (with small annotation) ============ */
.h2-spec {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 2.5rem 0 1rem;
  line-height: 1.15;
  color: var(--ink);
}

.h2-spec small {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-subtle);
  letter-spacing: 0.08em;
  margin-left: 0.75rem;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ============ CAPTION ============ */
.caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-subtle);
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
  line-height: 1.55;
}

.post-table-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-subtle);
  margin: 0.5rem 0 1.5rem;
  line-height: 1.5;
}

/* ============ FOOTER (complete system) ============ */
.footer-wrap {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 2.5rem;
}

.footer-brand-col,
.footer-brand {
  max-width: 280px;
}

.footer-tag {
  font-size: 0.875rem;
  color: rgba(244, 242, 236, 0.7);
  line-height: 1.55;
  margin: 1rem 0 0;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: rgba(244, 242, 236, 0.75);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: color 0.15s ease;
}

.footer-col a:hover { color: var(--bg); }

.footer-col-label,
.footer-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: rgba(244, 242, 236, 0.5);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-addr {
  font-size: 0.8125rem;
  color: rgba(244, 242, 236, 0.65);
  line-height: 1.5;
  margin-top: 0.5rem;
}

.footer-bottom-wrap {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(244, 242, 236, 0.1);
  font-size: 0.75rem;
  color: rgba(244, 242, 236, 0.5);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.footer-certs,
.footer-badges,
.cert-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-certs span,
.footer-badges span,
.cert-badges span {
  padding: 0.25rem 0.625rem;
  border: 1px solid rgba(244, 242, 236, 0.2);
  color: rgba(244, 242, 236, 0.65);
  letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
  .footer-wrap {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .footer-brand-col,
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .footer-wrap { grid-template-columns: 1fr; }
  .footer-bottom-wrap {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* ============ COMPARISON TABLE (6061 vs 7075) ============ */
.vs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.vs-table th,
.vs-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px dashed var(--rule);
  text-align: left;
  vertical-align: top;
  font-size: 0.9375rem;
}

.vs-table thead th {
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  font-weight: 500;
  border-bottom: 2px solid var(--ink);
}

.vs-table .property {
  font-weight: 500;
  color: var(--ink);
  width: 30%;
}

.vs-table .col-6061,
.vs-table .col-7075 {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink-muted);
  width: 35%;
}

.vs-table .better { color: var(--accent); font-weight: 500; }
.vs-table .worse { color: var(--warn); }

.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.decision-card {
  padding: 1.75rem;
  border: 1px solid var(--rule-strong);
  background: var(--bg-elevated);
  position: relative;
}

.decision-card.pick-6061 { border-left: 4px solid var(--accent); }
.decision-card.pick-7075 { border-left: 4px solid #2D7A4A; }

.pick-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.75rem;
}

.pick-heading {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.decision-card ul { margin: 0; padding-left: 1rem; }
.decision-card li { margin-bottom: 0.5rem; line-height: 1.55; font-size: 0.9375rem; }

@media (max-width: 640px) {
  .decision-grid { grid-template-columns: 1fr; }
}

/* ============ 404 ERROR PAGE ============ */
.error-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  padding: 5rem 0;
}

.error-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.error-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
  color: var(--ink);
}

.error-prose {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 560px;
  margin-bottom: 3rem;
}

.error-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.error-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}

.error-grid a {
  background: var(--bg);
  padding: 1.5rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
  display: block;
}

.error-grid a:hover { background: var(--bg-elevated); }

.error-grid .label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-subtle);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.error-grid .title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--ink);
}

@media (max-width: 640px) {
  .error-grid { grid-template-columns: 1fr; }
  .error-wrap { padding: 0 1.5rem; }
}

/* ============ DROP TEXT (for file uploaders) ============ */
.drop-text {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.5;
}

/* ============ FALLBACK FOR LEFTOVER CLASSES ============ */
/* These are used in one-off places — give them baseline inheritance
   so they don't render as unstyled inline text. */
.label { display: inline; }
.title { display: inline; }
.property { display: inline; }

/* ============================================================
   v4.1 LAYOUT FIXES (user reported)
   ============================================================ */

/* FIX 1: quote-layout was 3fr 2fr (content:sidebar = 3:2) and
   confined to .container (780px). User wants sidebar:content = 1:3,
   and the layout should be full-width (container-wide).
   The HTML wraps it in `.container`, so we upgrade that .container
   inside quote-layout's parent section to behave wider.
   Safest override: adjust the grid ratio and expand the section width. */

.quote-layout {
  grid-template-columns: 1fr 3fr;  /* sidebar 1 : content 3 */
  gap: 0;
  align-items: start;
}

/* Swap visual order — sidebar (nav) on left, content on right */
.quote-layout > aside,
.quote-layout > .quote-sidebar {
  order: 0;
  background: var(--bg-elevated);
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--rule);
  position: sticky;
  top: 80px;
  align-self: start;
}

.quote-layout > .quote-body,
.quote-layout > main,
.quote-layout > div:not(aside):not(.quote-sidebar) {
  order: 1;
  padding: 2.5rem 2.5rem;
  background: var(--bg);
}

/* Expand container when it wraps a quote-layout — make the "Why engineers"
   section feel full-width. */
.container:has(> .quote-layout),
.quote-wrap {
  max-width: var(--wide-max);
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 1024px) {
  .quote-layout {
    grid-template-columns: 1fr;
  }
  .quote-layout > aside,
  .quote-layout > .quote-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    position: static;
  }
  .quote-layout > .quote-body,
  .quote-layout > main,
  .quote-layout > div:not(aside):not(.quote-sidebar) {
    padding: 2rem 1.5rem;
  }
}

/* FIX 2: "Have a drawing? We'll quote it..." CTA at page bottom must be FULL WIDTH.
   This CTA is rendered as .cta-mini inside .quote-body in some templates,
   or as .cta-block at page bottom. Make sure both are full-bleed. */

/* When a CTA appears at the end of a materials/design-guide page,
   it should break out of its parent container. */
section.cta-block,
section.cta-block-wrap,
.cta-block-full {
  width: 100%;
  padding: 4.5rem 0;
  background: var(--bg-dark);
  color: var(--bg);
}

.cta-block > .container,
.cta-block > .cta-inner,
.cta-block > .cta-block-inner,
.cta-block > .container-wide {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.cta-block .cta-grid {
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
  align-items: center;
}

.cta-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--bg);
}

.cta-block p {
  margin: 0;
  color: rgba(244, 242, 236, 0.82);
  line-height: 1.6;
}

/* FIX 3: any CTA that renders inside a narrower container — force full bleed */
.cta-mini {
  padding: 2rem 2rem;
  margin: 3rem calc(50% - 50vw);  /* break out to full viewport width */
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
  background: var(--bg-dark);
  color: var(--bg);
}

.cta-mini .cta-mini-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* FIX 4: "Why engineers specify 7075-T6" section — ensure consistent width with rest.
   The section wraps in .container which is narrower than page-header's .container-wide.
   Upgrade to a wider container so it aligns with the header above it. */
section.section > .container:has(.quote-layout) {
  max-width: var(--wide-max);
  padding: 0 2rem;
}

/* Two-col sidebar: HTML convention is prose/content on LEFT, aside/CTA on RIGHT.
   So ratio should be wide:narrow = 3:1, not 1:3.
   (Contrast with .quote-layout where TOC aside is on the left → 1:3.) */
.two-col {
  grid-template-columns: 3fr 1fr;
  gap: 3rem;
  align-items: start;
}

.two-col > aside {
  position: sticky;
  top: 100px;
  align-self: start;
}

@media (max-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .two-col > aside {
    position: static;
  }
}

/* ============================================================
   v6 FIXES (user-reported layout issues from screenshots)
   ============================================================ */

/* FIX: CTA block content should use more of the available width.
   Previous max-width: 20ch on h2 and 52ch on p were too restrictive —
   content only used 60% of the block. Widen them. */
.cta-block h2 {
  max-width: 24ch;  /* was 20ch */
}

.cta-block p {
  max-width: 70ch;  /* was 52ch */
}

/* FIX: the CTA's ::before pseudo (300px of diagonal stripes) compresses content.
   Shrink it, so content gets more room. */
.cta-block::before {
  width: 220px;  /* was 300px */
}

/* FIX: remove brand-mark span before "fobproto" in nav + footer.
   It was an orphan marker with inconsistent sizing. */
.brand-mark {
  display: none !important;
}

/* FIX: make absolutely sure footer lists have no bullets.
   Some old pages still had <ul><li> inside .footer-col. */
.footer-col ul,
.footer-col ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li,
.footer-col ol li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col ul li::before,
.footer-col ol li::before {
  content: none !important;
}

/* FIX: Old .footer-grid style (used in homepage and some processes pages)
   — align with new .footer-wrap structure. Since we batch-replaced
   footers in v6_fix_footers.py, this mostly shouldn't matter, but
   guard in case any slipped through. */
.footer-grid {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 2.5rem;
}

.footer-grid .footer-brand h3,
.footer-grid h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--bg);
  margin: 0 0 0.75rem;
}

.footer-grid h5 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: rgba(244, 242, 236, 0.5);
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  font-weight: 400;
}

.footer-grid .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-grid .footer-col li {
  list-style: none;
}

.footer-grid .footer-col a {
  color: rgba(244, 242, 236, 0.75);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-grid .footer-col a:hover { color: var(--bg); }

.footer-grid .footer-brand p {
  color: rgba(244, 242, 236, 0.7);
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0;
}

.footer-grid + .footer-bottom {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(244, 242, 236, 0.1);
  font-size: 0.75rem;
  color: rgba(244, 242, 236, 0.5);
}

.footer-grid + .footer-bottom .badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-grid + .footer-bottom .badges span {
  padding: 0.25rem 0.625rem;
  border: 1px solid rgba(244, 242, 236, 0.2);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* FIX: "Ready to quote a part with this process?" CTA — ensure it reaches
   page edges (container-wide) by removing internal container padding limit. */
.cta-block {
  padding-left: 3rem;
  padding-right: 3rem;
}

@media (max-width: 640px) {
  .cta-block {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
