/* ============================================================
   Enterprise MSP Tender Template & Guide — scoped styles
   Everything is namespaced under .tender-guide so it cannot
   affect the rest of the RackCorp site. The document body uses
   inline styles for its blocks; this file provides the page
   chrome (hero, toolbar, layout) and the view-toggle behaviour.
   ============================================================ */

.tender-guide {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1f2937;
}
.tender-guide * { box-sizing: border-box; }
.tender-guide ::selection { background: #cb00001f; }

/* --- view toggle: Clean mode hides every guidance callout --- */
.tender-guide[data-mode="clean"] [data-guidance] { display: none !important; }
.tender-guide[data-mode="guidance"] [data-view="guidance"],
.tender-guide[data-mode="clean"] [data-view="clean"] {
  background: #CB0000 !important;
  color: #fff !important;
}

/* --- breadcrumb --- */
.tg-breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px 0;
}
.tg-breadcrumb .breadcrumb { margin: 0; font-size: 13px; }
.tg-breadcrumb a { color: #6b7280; text-decoration: none; }
.tg-breadcrumb a:hover { color: #CB0000; }
.tg-breadcrumb .active { color: #1f2937; }

/* --- hero --- */
.tg-hero {
  background: #CB0000;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-top: 12px;
}
.tg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 18%, rgba(255,255,255,0.14), rgba(255,255,255,0) 60%);
}
.tg-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 38px;
  position: relative;
}
.tg-hero__eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffd7d7;
  margin-bottom: 14px;
}
.tg-hero__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 20ch;
  color: #fff;
}
.tg-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.tg-hero__lead {
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.6;
  max-width: 60ch;
  color: #ffe9e9;
}

/* --- toolbar --- */
.tg-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e5e7;
}
.tg-toolbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.tg-toggle-wrap { display: flex; align-items: center; gap: 10px; }
.tg-toolbar__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
}
.tg-toggle {
  display: inline-flex;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  overflow: hidden;
}
.tg-toggle button {
  border: 0;
  background: #fff;
  color: #374151;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
}
.tg-toggle button + button { border-left: 1px solid #d4d4d8; }
.tg-toolbar__right { display: flex; align-items: center; gap: 12px; }
.tg-toolbar__hint {
  font-size: 12.5px;
  color: #6b7280;
  max-width: 46ch;
  line-height: 1.4;
}
.tg-toolbar__hint strong { color: #374151; }
.tg-print {
  border: 1px solid #d4d4d8;
  background: #fff;
  color: #374151;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

/* --- layout shell --- */
.tg-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.tg-main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 820px;
  padding: 36px 0 80px;
}

/* --- table of contents active state --- */
.tender-guide a[data-toc][data-current="1"] {
  color: #CB0000 !important;
  border-left-color: #CB0000 !important;
  font-weight: 600 !important;
}

/* --- responsive --- */
@media (max-width: 1080px) {
  .tender-guide [data-tocwrap] { display: none !important; }
  .tg-main { max-width: 100% !important; }
}

/* --- print / PDF --- */
@media print {
  .tg-toolbar,
  .tg-breadcrumb,
  .tender-guide [data-noprint],
  .tender-guide [data-tocwrap] { display: none !important; }
  .tg-shell { display: block !important; padding: 0 !important; }
  .tg-main { max-width: 100% !important; padding: 0 !important; }
  .tg-hero { margin-top: 0; }
  .tender-guide [data-req],
  .tender-guide [data-guidance] { break-inside: avoid; }
  .tender-guide h2 { break-after: avoid; }
}
