/* ==========================================================================
   Technet Engineering — Light Corporate Design System
   Palette: maroon accent, navy headings, near-black body on white/light-gray
   ========================================================================== */

:root {
  --maroon: #8B0000;
  --maroon-bright: #A50000;
  --maroon-tint: rgba(139, 0, 0, 0.06);
  --maroon-tint-strong: rgba(139, 0, 0, 0.12);
  --navy: #1B3A57;
  --navy-soft: #2c4a68;
  --text: #1a1a1a;
  --muted: #5a6472;
  --muted-soft: #7a8494;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --border: #e5e7eb;
  --code-bg: #16283b;
  --code-border: #2c4a68;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Poppins', 'Inter', sans-serif;
  color: var(--navy);
}

a { color: inherit; }

::selection { background: var(--maroon-tint-strong); }

/* ---------------- Top contact strip ---------------- */
.top-bar {
  background: var(--maroon);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.45rem 2rem;
}
.top-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.top-bar a { color: #fff; text-decoration: none; opacity: 0.95; }
.top-bar a:hover { text-decoration: underline; }
.top-bar-item { display: inline-flex; align-items: center; gap: 6px; }
.top-bar-item svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ---------------- Navbar ---------------- */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 2rem;
  gap: 1.5rem;
}
.logo {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo span { color: var(--maroon); }
.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  font-weight: 600;
  font-size: 0.88rem;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--maroon); }
.nav-links a.active { color: var(--maroon); border-color: var(--maroon); }

/* ---------------- Buttons ---------------- */
.btn-pill {
  display: inline-block;
  background: var(--maroon);
  color: #fff !important;
  padding: 0.7rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: 0.2s;
  border: 2px solid var(--maroon);
  cursor: pointer;
}
.btn-pill:hover { background: var(--maroon-bright); border-color: var(--maroon-bright); }
.btn-pill-outline { background: transparent; color: var(--maroon) !important; }
.btn-pill-outline:hover { background: var(--maroon); color: #fff !important; }
.btn-pill-navy { background: var(--navy); border-color: var(--navy); }
.btn-pill-navy:hover { background: var(--navy-soft); border-color: var(--navy-soft); }
.btn-pill-sm { padding: 0.5rem 1.25rem; font-size: 0.75rem; }
.btn-pill-block { display: block; width: 100%; text-align: center; }

/* ---------------- Page title band (interior pages) ---------------- */
.page-title-band {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 3.25rem 2rem;
  text-align: center;
}
.page-title-band .tag-label { display: inline-block; margin-bottom: 0.75rem; }
.page-title-band h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.15;
}
.page-title-band p {
  color: var(--muted);
  margin-top: 0.85rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
}

/* ---------------- Section heading with accent bar ---------------- */
.accent-heading { position: relative; padding-left: 1.1rem; }
.accent-heading::before {
  content: '';
  position: absolute;
  left: 0; top: 0.15em; bottom: 0.15em;
  width: 4px;
  background: var(--maroon);
  border-radius: 2px;
}
.accent-heading h2, .accent-heading h3 { margin: 0; }

.tag-label {
  color: var(--maroon);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* ---------------- Alternating section backgrounds ---------------- */
.section-white { background: #fff; }
.section-alt { background: var(--bg-alt); }

/* ---------------- Cards ---------------- */
.card-light {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}
.card-light:hover { box-shadow: 0 12px 28px -12px rgba(27,58,87,0.18); transform: translateY(-3px); border-color: #d8dde3; }

.stat-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.stat-box .stat-num { color: var(--maroon); font-weight: 800; }

.chip {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
}
.chip-outline { background: #fff; }

/* module / node / principle / timeline / finding — light variants */
.module, .node, .principle {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.node .dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--maroon); display: inline-block; margin-right: 8px;
}
.principle .num { font-family: 'JetBrains Mono', monospace; color: var(--maroon); font-weight: 700; font-size: 13px; }

.timeline-item { border-left: 2px solid var(--border); padding-left: 20px; padding-bottom: 28px; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -7px; top: 2px;
  width: 12px; height: 12px; border-radius: 999px; background: var(--maroon);
}
.timeline-item:last-child { padding-bottom: 0; }

.finding {
  border-left: 3px solid var(--maroon);
  background: var(--maroon-tint);
  padding: 1.25rem 1.5rem;
  border-radius: 0 10px 10px 0;
}

.honesty-box {
  background: rgba(27,58,87,0.05);
  border: 1px solid rgba(27,58,87,0.18);
  border-radius: 12px;
}

.security-alert { border-left: 4px solid var(--maroon); background: var(--maroon-tint); padding: 1.5rem; }
.security-alert.sev-orange { border-left-color: #c2620a; background: rgba(194,98,10,0.06); }
.security-alert.sev-gold { border-left-color: #a67c00; background: rgba(166,124,0,0.06); }
.security-alert.sev-navy { border-left-color: var(--navy); background: rgba(27,58,87,0.05); }

.check-item { display: flex; align-items: flex-start; gap: 10px; }
.check-item svg { flex-shrink: 0; margin-top: 3px; color: var(--maroon); }

.stack-chip { background: var(--bg-alt); border: 1px solid var(--border); color: var(--navy); border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 600; }

/* ---------------- Dark code / terminal accent block (intentional contrast) ---------------- */
.terminal {
  background: var(--code-bg);
  border-left: 4px solid var(--maroon-bright);
  padding: 1rem;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  color: #cfe3f5;
}
.terminal .cmt { color: #7c93a8; }

/* ---------------- Icon box (flat 2-color line art) ---------------- */
.icon-box {
  width: 4.5rem; height: 4.5rem; border-radius: 1rem;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--maroon); flex-shrink: 0;
}
.icon-box svg { width: 2.25rem; height: 2.25rem; }
.icon-box.navy { color: var(--navy); }

/* ---------------- Photo treatment (inset, not full-bleed dark hero) ---------------- */
.inset-photo {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px -20px rgba(27,58,87,0.35);
}
.inset-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-credit { color: var(--muted-soft); font-size: 0.72rem; margin-top: 0.5rem; }

/* ---------------- Forms ---------------- */
input, select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px var(--maroon-tint-strong);
}
label {
  display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); margin-bottom: 8px;
}
.field { margin-bottom: 22px; }
.honeypot { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--maroon); }

/* ---------------- Misc gradients (light version of old grid-fade) ---------------- */
.grid-fade {
  background: radial-gradient(circle at 20% 0%, rgba(139,0,0,0.05), transparent 45%),
              radial-gradient(circle at 80% 10%, rgba(27,58,87,0.05), transparent 40%);
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* ==========================================================================
   Reference-page components: code blocks w/ copy, tabs, accordion
   ========================================================================== */

/* ---------------- Code block (dark, monospace, intentional contrast) ---------------- */
.code-block { position: relative; margin: 1.1rem 0; }
.code-block pre {
  background: var(--code-bg);
  border-left: 4px solid var(--maroon-bright);
  border-radius: 8px;
  padding: 1.35rem 1.25rem 1.1rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #cfe3f5;
  margin: 0;
  white-space: pre;
}
.code-block pre code { font-family: inherit; background: none; }
.code-block .cmt { color: #7c93a8; }
.code-block .str { color: #9fd88a; }
.code-block .code-label {
  position: absolute; top: -0.6rem; left: 1.1rem;
  background: var(--navy); color: #fff; font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; padding: 3px 11px; border-radius: 999px;
  z-index: 2;
}
.code-block .copy-btn {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  background: rgba(255,255,255,0.08); color: #cfe3f5; border: 1px solid rgba(255,255,255,0.18);
  font-size: 0.68rem; font-weight: 700; padding: 4px 11px; border-radius: 6px; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: background 0.15s, border-color 0.15s;
}
.code-block .copy-btn:hover { background: rgba(255,255,255,0.18); }
.code-block .copy-btn.copied { background: var(--maroon-bright); color: #fff; border-color: var(--maroon-bright); }

/* ---------------- Tabs (grouping multiple code samples / topics) ---------------- */
.tabs { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; }
.tab-nav {
  display: flex; flex-wrap: wrap; background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tab-btn {
  padding: 0.85rem 1.3rem; font-size: 0.82rem; font-weight: 700; color: var(--muted);
  background: transparent; border: none; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; font-family: inherit; transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--maroon); border-bottom-color: var(--maroon); background: #fff; }
.tab-panel { display: none; padding: 1.5rem; }
.tab-panel.active { display: block; }

/* ---------------- Accordion (troubleshooting one-liners, findings, FAQs) ---------------- */
.accordion-item {
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.7rem;
  overflow: hidden; background: #fff;
}
.accordion-header {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  width: 100%; text-align: left; padding: 1rem 1.25rem; background: #fff; border: none;
  cursor: pointer; font-weight: 700; font-size: 0.92rem; color: var(--text); font-family: inherit;
  transition: background 0.15s;
}
.accordion-header:hover { background: var(--bg-alt); }
.accordion-header .accordion-code { color: var(--maroon); font-family: 'JetBrains Mono', monospace; font-weight: 600; margin-right: 0.5rem; }
.accordion-header .chevron { flex-shrink: 0; transition: transform 0.2s; color: var(--maroon); }
.accordion-item.open .chevron { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; background: var(--bg-alt); }
.accordion-item.open .accordion-body { max-height: 600px; }
.accordion-body-inner { padding: 0.1rem 1.25rem 1.1rem; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* ---------------- Reference table ---------------- */
.ref-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ref-table th, .ref-table td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); }
.ref-table th { color: var(--navy); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.06em; background: var(--bg-alt); }
.ref-table td.mono { font-size: 0.82rem; }
.ref-table tr:last-child td { border-bottom: none; }
.ref-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.ref-table-wrap .ref-table { border: none; }

/* ---------------- Small back-link / breadcrumb style used across ref pages ---------------- */
.deep-link { color: var(--maroon); text-decoration: underline; font-weight: 600; }
.deep-link:hover { color: var(--maroon-bright); }

/* ---------------- Mobile ---------------- */
@media (max-width: 768px) {
  .navbar-inner { padding: 0.85rem 1.25rem; flex-wrap: wrap; row-gap: 0.65rem; }
  .logo { font-size: 1.1rem; }
  .nav-links {
    order: 3;
    width: 100%;
    gap: 1.1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    font-size: 0.82rem;
    scrollbar-width: thin;
  }
  .nav-links a { white-space: nowrap; }
  .top-bar { padding: 0.4rem 1.25rem; }
  .page-title-band { padding: 2.25rem 1.25rem; }
  .page-title-band h1 { font-size: 2rem; }
}

@media (max-width: 420px) {
  .page-title-band h1 { font-size: 1.65rem; }
  .top-bar-inner { font-size: 0.68rem; }
}

@media (max-width: 640px) {
  .tab-btn { padding: 0.75rem 1rem; font-size: 0.78rem; }
  .tab-panel { padding: 1.1rem; }
  .code-block pre { font-size: 0.74rem; padding: 1.3rem 1rem 1rem; }
  .code-block .copy-btn { font-size: 0.62rem; padding: 3px 9px; }
  .accordion-header { padding: 0.85rem 1rem; font-size: 0.85rem; }
  .accordion-body-inner { padding: 0.1rem 1rem 1rem; font-size: 0.85rem; }
  .ref-table th, .ref-table td { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
}
