/* SoftRF-PG Documentation - Sky Blue Theme */
:root {
  --primary: #0288d1;
  --primary-light: #4fc3f7;
  --primary-dark: #01579b;
  --primary-bg: #e1f5fe;
  --accent: #0277bd;
  --bg: #f5f9fc;
  --bg-card: #ffffff;
  --text: #1a2a3a;
  --text-secondary: #546e7a;
  --text-light: #78909c;
  --border: #b3e5fc;
  --border-light: #e0f2f7;
  --header-bg: #01579b;
  --header-text: #ffffff;
  --nav-bg: #ffffff;
  --nav-hover: #e1f5fe;
  --nav-active: #0288d1;
  --code-bg: #eceff1;
  --code-border: #cfd8dc;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 8px;
  --max-width: 1100px;
  --sidebar-width: 260px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--header-bg), var(--primary));
  color: var(--header-text);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.site-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--header-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-title:hover { opacity: 0.9; }

.site-title svg {
  width: 28px;
  height: 28px;
}

/* Navigation */
.top-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.top-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.top-nav a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.top-nav a.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

/* Layout */
.page-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 24px;
  padding: 24px;
  min-height: calc(100vh - 120px);
}

/* Sidebar / Table of Contents */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.sidebar-inner {
  position: sticky;
  top: 72px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 0;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  padding: 8px 20px;
  margin-bottom: 4px;
}

.sidebar-nav a {
  display: block;
  padding: 6px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.5;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.sidebar-nav a:hover {
  color: var(--primary);
  background: var(--nav-hover);
  border-left-color: var(--primary-light);
}

.sidebar-nav a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
  background: var(--primary-bg);
}

.sidebar-nav a.indent {
  padding-left: 32px;
  font-size: 12px;
}

/* Main content */
.main-content {
  flex: 1;
  min-width: 0;
}

.content-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 40px;
}

/* Typography */
h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-top: 36px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 8px;
}

h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 20px;
  margin-bottom: 6px;
}

p {
  margin-bottom: 14px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  margin: 10px 0 14px 24px;
}

li {
  margin-bottom: 6px;
}

/* Code */
code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  color: #c62828;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 12px 0 16px;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text);
  font-size: 13px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 14px;
}

th {
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border);
}

td {
  padding: 8px 14px;
  border: 1px solid var(--border-light);
}

tr:nth-child(even) td {
  background: #fafcfe;
}

/* Info boxes */
.info-box {
  background: var(--primary-bg);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 14px;
}

.info-box.warning {
  background: #fff3e0;
  border-left-color: #f57c00;
}

.info-box.tip {
  background: #e8f5e9;
  border-left-color: #43a047;
}

.info-box strong {
  display: block;
  margin-bottom: 4px;
}

/* Cards grid for index page */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.card-link {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  box-shadow: var(--shadow);
}

.card-link:hover {
  text-decoration: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-link h3 {
  color: var(--primary);
  margin: 0 0 8px;
  font-size: 16px;
}

.card-link p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

.card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

/* Hero section for index */
.hero {
  background: linear-gradient(135deg, var(--header-bg), var(--primary));
  color: white;
  padding: 48px 40px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  text-align: center;
}

.hero h1 {
  color: white;
  border: none;
  font-size: 32px;
  margin-bottom: 12px;
  padding: 0;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* Footer */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
}

.site-footer a {
  color: var(--text-secondary);
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 18px;
}

.back-to-top.visible { opacity: 1; }
.back-to-top:hover { background: var(--primary-dark); text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .page-layout { padding: 16px; }
  .content-card { padding: 20px 24px; }
  h1 { font-size: 24px; }
  h2 { font-size: 19px; }

  .menu-toggle { display: block; }

  .top-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    flex-direction: column;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  .top-nav.open { display: flex; }

  .top-nav a {
    padding: 10px 16px;
    border-radius: 4px;
  }

  .hero { padding: 32px 20px; }
  .hero h1 { font-size: 24px; }
}

@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 10px 16px; }
  .site-title { font-size: 16px; }
}

/* Compatibility matrix check/cross cells */
td.check { text-align: center; color: #2e7d32; font-size: 1.1em; font-weight: bold; }
td.cross  { text-align: center; color: #c62828; font-size: 1.1em; }

/* Print */
@media print {
  .site-header, .sidebar, .site-footer, .back-to-top { display: none; }
  .page-layout { display: block; padding: 0; }
  .content-card { box-shadow: none; padding: 0; }
}
