/* ─────────────────────────────────────────────────────────────────────────────
   TAINUX DOCS · Red Hat Design System
   Fonts:  Red Hat Display · Red Hat Text · Red Hat Mono
   Colors: #EE0000 red · #151515 dark · #ffffff light
───────────────────────────────────────────────────────────────────────────── */
:root {
  --rh-red:       #EE0000;
  --rh-red-dark:  #C00000;
  --rh-red-light: rgba(238,0,0,.1);
  --rh-dark:      #151515;
  --rh-dark2:     #1a1a1a;
  --rh-dark3:     #212121;
  --rh-white:     #ffffff;
  --rh-gray-10:   #f5f5f5;
  --rh-gray-20:   #e8e8e8;
  --rh-gray-50:   #8a8d90;
  --rh-gray-70:   #4f5255;
  --rh-gray-90:   #1b1d21;
  --rh-blue:      #0066CC;
  --border-light: #e8e8e8;
  --border-dark:  rgba(255,255,255,.1);

  --f-display: 'Red Hat Display', 'Helvetica Neue', Arial, sans-serif;
  --f-text:    'Red Hat Text',    'Helvetica Neue', Arial, sans-serif;
  --f-mono:    'Red Hat Mono',    'Courier New', monospace;

  --nav-h:    72px;
  --sidebar-w: 264px;
  --max:      1200px;
  --ease:     cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; font-size: 16px; }
body { font-family: var(--f-text); background: var(--rh-white); color: var(--rh-dark); overflow-x: hidden; line-height: 1.6; }
img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
*:focus-visible { outline: 2px solid var(--rh-blue); outline-offset: 3px; }
::selection { background: var(--rh-red); color: #fff; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--rh-red); }

/* ── NAV (same as tainux.io) ──────────────────────────────────────────────── */
#nav {
  position: fixed; inset-block-start: 0; inset-inline: 0;
  z-index: 9000; height: var(--nav-h);
  background: var(--rh-dark);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-w {
  max-width: 100%; height: 100%;
  padding: 0 clamp(16px,3vw,40px);
  display: flex; align-items: center; gap: 0;
}
.nav-logo { display: flex; align-items: center; gap: 12px; margin-right: 32px; flex-shrink: 0; text-decoration: none; }
.nav-logo img { height: 32px; width: 32px; object-fit: contain; border-radius: 50%; }
.nav-logo-name { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: var(--rh-white); letter-spacing: -.01em; }
.nav-logo-name em { color: var(--rh-red); font-style: normal; }
.nav-div { width: 1px; height: 22px; background: rgba(255,255,255,.15); margin: 0 20px; flex-shrink: 0; }
.nav-product-label { font-family: var(--f-text); font-size: .8rem; font-weight: 400; color: rgba(255,255,255,.5); white-space: nowrap; }
.nav-links { display: flex; align-items: center; list-style: none; margin-left: auto; gap: 0; }
.nav-links a {
  display: block; padding: 8px 14px;
  font-family: var(--f-text); font-size: .88rem; font-weight: 400;
  color: rgba(255,255,255,.75); border-radius: 3px; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--rh-white); background: rgba(255,255,255,.08); }
.nav-cta {
  margin-left: 12px; flex-shrink: 0;
  padding: 9px 22px;
  font-family: var(--f-text); font-size: .88rem; font-weight: 500;
  background: var(--rh-red); color: var(--rh-white);
  border-radius: 3px; transition: background .18s;
}
.nav-cta:hover { background: var(--rh-red-dark); }
.nav-burger { display: none; padding: 8px; color: rgba(255,255,255,.7); border-radius: 3px; }

/* ── DOCS LAYOUT ──────────────────────────────────────────────────────────── */
.docs-body {
  display: flex;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--rh-dark);
  min-height: calc(100vh - var(--nav-h));
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,.06);
  padding-bottom: 40px;
}

.sb-section { padding: 24px 16px 4px; }
.sb-section-label {
  font-family: var(--f-mono); font-size: .65rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.28); display: block; padding: 0 8px 8px;
}
.sb-nav { list-style: none; }
.sb-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 3px;
  font-family: var(--f-text); font-size: .86rem; font-weight: 400;
  color: rgba(255,255,255,.6);
  transition: color .14s, background .14s;
  margin-bottom: 1px;
}
.sb-nav a .icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.sb-nav a:hover { color: var(--rh-white); background: rgba(255,255,255,.07); }
.sb-nav a.active {
  color: var(--rh-white); font-weight: 500;
  background: rgba(238,0,0,.18);
  border-left: 3px solid var(--rh-red);
  padding-left: 9px;
}
.sb-version {
  margin: 20px 16px 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 3px;
  font-family: var(--f-mono); font-size: .68rem; color: rgba(255,255,255,.3);
  line-height: 1.8;
}
.sb-version span { color: var(--rh-red); }

/* ── MAIN CONTENT ─────────────────────────────────────────────────────────── */
#main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

/* ── TOPBAR / BREADCRUMB ──────────────────────────────────────────────────── */
.topbar {
  background: var(--rh-white);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 48px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: var(--nav-h); z-index: 50;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: .72rem; color: var(--rh-gray-50);
}
.breadcrumb a { color: var(--rh-gray-50); transition: color .14s; }
.breadcrumb a:hover { color: var(--rh-red); }
.breadcrumb .sep { color: var(--border-light); }
.topbar-actions { display: flex; gap: 16px; align-items: center; }
.topbar-actions a {
  font-family: var(--f-text); font-size: .8rem; color: var(--rh-gray-50);
  transition: color .14s;
}
.topbar-actions a:hover { color: var(--rh-red); }

/* ── PAGE WRAP ────────────────────────────────────────────────────────────── */
.content-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 52px 48px 96px;
}

/* ── PAGE HEADER ──────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 48px; }
.page-eyebrow {
  font-family: var(--f-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--rh-red);
  display: block; margin-bottom: 12px;
}
.page-title {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.1; letter-spacing: -.02em;
  color: var(--rh-dark); margin-bottom: 16px;
}
.page-desc {
  font-family: var(--f-text); font-size: 1rem;
  color: var(--rh-gray-70); line-height: 1.75;
  max-width: 600px;
}

/* ── TYPOGRAPHY ───────────────────────────────────────────────────────────── */
.content h2 {
  font-family: var(--f-display); font-weight: 700;
  font-size: 1.4rem; letter-spacing: -.01em;
  color: var(--rh-dark);
  margin: 52px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  scroll-margin-top: 130px;
}
.content h3 {
  font-family: var(--f-display); font-weight: 700;
  font-size: 1.05rem; color: var(--rh-dark);
  margin: 32px 0 10px;
  scroll-margin-top: 130px;
}
.content h4 {
  font-family: var(--f-mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--rh-gray-50); margin: 24px 0 8px;
}
.content p { margin-bottom: 16px; color: var(--rh-gray-70); line-height: 1.75; }
.content p strong { color: var(--rh-dark); font-weight: 600; }
.content ul, .content ol { margin: 0 0 16px 24px; color: var(--rh-gray-70); }
.content li { margin-bottom: 6px; line-height: 1.7; }
.content a { color: var(--rh-blue); }
.content a:hover { text-decoration: underline; }

/* ── CODE ─────────────────────────────────────────────────────────────────── */
.content code {
  font-family: var(--f-mono); font-size: .82rem;
  background: var(--rh-red-light); color: var(--rh-red);
  padding: 2px 7px; border-radius: 2px;
}
pre {
  background: var(--rh-gray-90);
  border-radius: 3px;
  padding: 22px 24px;
  overflow-x: auto;
  margin: 20px 0;
  position: relative;
}
pre::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--rh-red);
  border-radius: 3px 3px 0 0;
}
pre code {
  font-family: var(--f-mono); font-size: .78rem; line-height: 2;
  background: none; color: rgba(255,255,255,.75); padding: 0;
}
pre code .kw  { color: #ff6b6b; font-weight: 600; }
pre code .val { color: #79c0ff; }
pre code .str { color: #7ee787; }
pre code .cm  { color: rgba(255,255,255,.28); font-style: italic; }

/* ── CALLOUTS ─────────────────────────────────────────────────────────────── */
.callout {
  border-radius: 3px; padding: 16px 20px; margin: 20px 0;
  border-left: 4px solid; font-size: .9rem; line-height: 1.7;
}
.callout-tip    { background: #f0fff4; border-color: #22c55e; }
.callout-warn   { background: #fffbeb; border-color: #f59e0b; }
.callout-info   { background: #eff6ff; border-color: #3b82f6; }
.callout-danger { background: var(--rh-red-light); border-color: var(--rh-red); }
.callout-label {
  font-family: var(--f-mono); font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  display: block; margin-bottom: 4px;
}
.callout-tip    .callout-label { color: #16a34a; }
.callout-warn   .callout-label { color: #d97706; }
.callout-info   .callout-label { color: #2563eb; }
.callout-danger .callout-label { color: var(--rh-red); }

/* ── CARDS GRID (landing) ─────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  margin: 32px 0;
}
.doc-card {
  background: var(--rh-white); padding: 28px 24px;
  text-decoration: none; color: var(--rh-dark);
  display: block; position: relative; overflow: hidden;
  transition: background .2s;
}
.doc-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--rh-red); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.doc-card:hover { background: var(--rh-gray-10); }
.doc-card:hover::before { transform: scaleX(1); }
.doc-card-icon { font-size: 22px; margin-bottom: 12px; }
.doc-card-tag {
  font-family: var(--f-mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--rh-red);
  margin-bottom: 6px;
}
.doc-card-title {
  font-family: var(--f-display); font-weight: 700; font-size: 1rem;
  color: var(--rh-dark); margin-bottom: 8px;
}
.doc-card-desc { font-family: var(--f-text); font-size: .84rem; color: var(--rh-gray-70); line-height: 1.65; }

/* ── TABLE ────────────────────────────────────────────────────────────────── */
.content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .88rem; }
.content th {
  background: var(--rh-gray-10); text-align: left;
  padding: 10px 14px; border: 1px solid var(--border-light);
  font-family: var(--f-mono); font-size: .65rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--rh-gray-70);
}
.content td { padding: 10px 14px; border: 1px solid var(--border-light); color: var(--rh-gray-70); vertical-align: top; }
.content tr:nth-child(even) td { background: rgba(0,0,0,.02); }

/* ── STEPS ────────────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 0 0 24px; counter-reset: step; }
.steps li {
  display: flex; gap: 16px; margin-bottom: 24px; counter-increment: step;
}
.steps li::before {
  content: counter(step);
  flex-shrink: 0; width: 30px; height: 30px;
  background: var(--rh-red); color: #fff;
  font-family: var(--f-display); font-weight: 800; font-size: .85rem;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.steps li .step-body { flex: 1; }
.steps li .step-title { font-family: var(--f-display); font-weight: 700; font-size: .95rem; color: var(--rh-dark); margin-bottom: 5px; }
.steps li .step-desc  { font-family: var(--f-text); font-size: .86rem; color: var(--rh-gray-70); line-height: 1.7; }
.steps li pre { margin-top: 10px; }

/* ── BADGE / PILL ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 2px;
  font-family: var(--f-mono); font-size: .64rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}
.badge-red    { background: var(--rh-red-light); color: var(--rh-red); }
.badge-green  { background: rgba(34,197,94,.1);  color: #16a34a; }
.badge-blue   { background: rgba(0,102,204,.1);  color: #0066CC; }
.badge-gray   { background: var(--rh-gray-10);   color: var(--rh-gray-70); }
.badge-yellow { background: rgba(245,158,11,.1); color: #d97706; }

/* ── DIVIDER ──────────────────────────────────────────────────────────────── */
hr.band { border: none; border-top: 3px solid var(--rh-red); margin: 0; }
hr.divider { border: none; border-top: 1px solid var(--border-light); margin: 40px 0; }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
footer {
  background: var(--rh-dark);
  border-top: 3px solid var(--rh-red);
  padding: 28px clamp(16px,3vw,48px);
  margin-left: var(--sidebar-w);
}
.foot-inner {
  max-width: var(--max); margin: auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { height: 26px; width: 26px; border-radius: 50%; opacity: .8; }
.foot-brand-name { font-family: var(--f-display); font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.65); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { font-family: var(--f-text); font-size: .8rem; color: rgba(255,255,255,.4); transition: color .18s; }
.foot-links a:hover { color: var(--rh-white); }
.foot-copy { font-family: var(--f-text); font-size: .75rem; color: rgba(255,255,255,.22); }

/* ── LANGUAGE SWITCHER (nav) ──────────────────────────────────────────────── */
.nav-lang {
  display: flex; align-items: center; gap: 0;
  margin-left: 12px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.15); border-radius: 3px; overflow: hidden;
}
.nav-lang a {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  font-family: var(--f-mono); font-size: .72rem; font-weight: 600;
  color: rgba(255,255,255,.5); text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
  border-right: 1px solid rgba(255,255,255,.1);
}
.nav-lang a:last-child { border-right: none; }
.nav-lang a:hover { background: rgba(255,255,255,.08); color: var(--rh-white); }
.nav-lang a.active { background: var(--rh-red); color: var(--rh-white); }

/* ── PORTAL LAYOUT (no sidebar) ──────────────────────────────────────────── */
.portal-body {
  padding-top: var(--nav-h);
  min-height: 100vh;
  background: var(--rh-white);
}
.portal-hero {
  background: var(--rh-dark);
  padding: 80px clamp(20px,6vw,80px) 72px;
  border-bottom: 3px solid var(--rh-red);
}
.portal-hero-inner { max-width: var(--max); margin: 0 auto; }
.portal-eyebrow {
  font-family: var(--f-mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--rh-red); display: block; margin-bottom: 20px;
}
.portal-title {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.08; letter-spacing: -.03em;
  color: var(--rh-white); margin-bottom: 20px;
}
.portal-desc {
  font-family: var(--f-text); font-size: 1.05rem;
  color: rgba(255,255,255,.6); line-height: 1.75; max-width: 560px;
}
.portal-content {
  max-width: var(--max); margin: 0 auto;
  padding: 64px clamp(20px,6vw,80px) 96px;
}
.portal-section-label {
  font-family: var(--f-mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--rh-gray-50); display: block; margin-bottom: 28px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}
.product-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border-light); border-radius: 4px;
  background: var(--rh-white);
  text-decoration: none; color: inherit;
  transition: border-color .18s, box-shadow .18s;
  overflow: hidden;
  position: relative;
}
.product-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--rh-red);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s var(--ease);
}
.product-card:hover::before { transform: scaleX(1); }
.product-card:hover { border-color: rgba(238,0,0,.25); box-shadow: 0 8px 32px rgba(21,21,21,.1); }
.product-card-body { padding: 28px 28px 20px; flex: 1; }
.product-card-icon {
  width: 44px; height: 44px; border-radius: 4px;
  background: var(--rh-red); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.product-card-icon svg { width: 22px; height: 22px; color: #fff; }
.product-card-name {
  font-family: var(--f-display); font-size: 1.1rem; font-weight: 700;
  color: var(--rh-dark); margin-bottom: 8px; letter-spacing: -.01em;
}
.product-card-desc {
  font-family: var(--f-text); font-size: .875rem;
  color: var(--rh-gray-70); line-height: 1.65;
}
.product-card-footer {
  padding: 16px 28px; border-top: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.product-card-tag {
  font-family: var(--f-mono); font-size: .65rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--rh-gray-50);
}
.product-card-cta {
  font-family: var(--f-text); font-size: .8rem; font-weight: 600;
  color: var(--rh-red); display: flex; align-items: center; gap: 5px;
  transition: gap .15s;
}
.product-card:hover .product-card-cta { gap: 9px; }
.product-card.soon { opacity: .55; pointer-events: none; cursor: default; }
.product-card.soon::before { display: none; }
.portal-footer-note {
  font-family: var(--f-text); font-size: .875rem;
  color: var(--rh-gray-70); line-height: 1.75;
  border-top: 1px solid var(--border-light); padding-top: 40px;
}
.portal-footer { margin-left: 0; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --sidebar-w: 0px; }
  #sidebar { display: none; }
  #main { margin-left: 0; }
  footer { margin-left: 0; }
  .content-wrap { padding: 32px 20px 64px; }
  .topbar { padding: 12px 20px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta, .nav-div, .nav-product-label { display: none; }
  .nav-burger { display: flex; }
  .nav-lang {
    display: flex;
    margin-left: auto;
    margin-right: 8px;
  }
  .nav-lang a { padding: 5px 8px; font-size: .65rem; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: fixed; top: var(--nav-h); inset-inline: 0;
    background: var(--rh-dark);
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding: 12px 16px 24px; gap: 2px; z-index: 8999;
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a { display: block; width: 100%; padding: 10px 12px; }
  .card-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .portal-hero { padding: 48px 20px 44px; }
}
