:root {
  --radical-orange: #e93c1d;
  --radical-accent: #d4351c;
  --radical-dark: #2C3E50;
  --radical-light-grey: #f5f5f5;
  --radical-grey: #4a5c6a;
  --radical-light: #ecf0f1;
  --radical-tab-grey: #f8f9fa;
  --radical-tab-border: #dee2e6;
  --radical-hover-grey: #e9ecef;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--radical-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: white;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* =============================================================
   Header — mirrors www.radicalsystems.co.za
   ============================================================= */
.header {
    padding: 1rem 1.5rem;
    border-bottom: 4px solid var(--radical-orange);
    background-color: var(--radical-light-grey);
    color: var(--radical-dark);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1320px) {
    .header-content { flex-wrap: nowrap; gap: 0.75rem; }
    .main-nav { gap: 0.2rem !important; flex-wrap: nowrap; }
    .nav-link { padding: 0.35rem 0.55rem; font-size: 0.88rem; gap: 0.3rem; white-space: nowrap; }
    .nav-link i { font-size: 0.88rem; }
    /* robot-mascot sizing handled by the explicit height rules below */
    .logo-main-text { font-size: 2.1rem !important; margin-bottom: 0.15rem !important; }
    .logo-sub-text { font-size: 0.78rem !important; letter-spacing: 1.6px !important; margin-bottom: 0.3rem !important; }
    .tagline { display: none; }
}

@media (max-width: 1024px) {
    .nav-link { padding: 0.45rem 0.6rem; font-size: 1rem; position: relative; }
    .nav-link i { font-size: 1.05rem; }
    .nav-link span { display: none; }
    .nav-link:hover span,
    .nav-link:focus-visible span {
        display: block;
        position: absolute;
        top: calc(100% + 0.4rem);
        left: 50%;
        transform: translateX(-50%);
        background: var(--radical-dark);
        color: white;
        padding: 0.3rem 0.6rem;
        border-radius: 4px;
        font-size: 0.8rem;
        font-weight: 500;
        line-height: 1;
        white-space: nowrap;
        z-index: 50;
        pointer-events: none;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }
}

@media (max-width: 640px) {
    .header-content { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .header-nav { align-items: flex-start !important; width: 100%; }
    .main-nav { flex-wrap: wrap; }
}

.header-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--radical-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link i { font-size: 1rem; }

.nav-link:hover {
    background-color: rgba(255, 107, 53, 0.1);
    color: var(--radical-orange);
}

.nav-link.active {
    background-color: var(--radical-orange);
    color: white;
}

.logo-container { display: flex; align-items: center; gap: 1rem; }
.logo-with-robot { display: flex; align-items: center; gap: 1rem; }
.robot-mascot { height: 56px; width: auto; }
.radical-logo { height: 42px; width: auto; display: block; }

@media (max-width: 1320px) {
    .robot-mascot { height: 40px !important; width: auto !important; }
    .radical-logo { height: 30px !important; }
}
@media (max-width: 640px) {
    .robot-mascot { height: 32px !important; }
    .radical-logo { height: 24px !important; }
}
.logo-redesign { text-align: left; position: relative; display: inline-block; }

.logo-main-text {
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    font-size: 2.8rem;
    font-weight: 300;
    color: var(--radical-orange);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.logo-sub-text {
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--radical-dark);
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.logo-sub-text-light {
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--radical-light);
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.logo-accent-line {
    width: 100%;
    height: 0.25rem;
    background: linear-gradient(90deg, var(--radical-orange) 0%, var(--radical-orange) 30%, transparent 100%);
    border-radius: 0.125rem;
}

.tagline {
    font-size: 1.125rem;
    font-weight: bold;
    opacity: 0.9;
    color: var(--radical-dark);
}

/* =============================================================
   Main content
   ============================================================= */
main {
  flex: 1;
  padding: 2rem 0;
}

.hero {
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.hero h1 {
  color: var(--radical-orange);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

h1, h2, h3 { line-height: 1.3; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }

a { color: var(--radical-orange); text-decoration: none; }
a:hover { color: #e55a2b; }

/* Resource grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.resource-card {
  display: block;
  padding: 1.5rem;
  background: var(--radical-light-grey);
  border-radius: 0.5rem;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  text-decoration: none;
}

.resource-card:hover {
  border-color: var(--radical-orange);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.resource-card h2 {
  color: var(--radical-orange);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.resource-card p {
  color: var(--radical-grey);
  font-size: 0.9rem;
}

/* Page summaries */
.page-summary {
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.page-summary h2 { margin-bottom: 0.25rem; }
.page-summary p { color: var(--radical-grey); }

/* =============================================================
   Footer — mirrors www.radicalsystems.co.za
   ============================================================= */
.site-footer {
    background: var(--radical-dark);
    color: white;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    padding: 3rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .footer-content { grid-template-columns: repeat(2, 1fr); }
    .footer-content .footer-section:first-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .footer-content { grid-template-columns: 1fr; }
    .footer-content .footer-section:first-child { grid-column: auto; }
}

.footer-section { display: flex; flex-direction: column; }

.footer-logo { margin-bottom: 1rem; }

.footer-logo .logo-redesign {
    margin-bottom: 1rem;
    transform: scale(0.8);
    transform-origin: left;
}

.footer-logo .logo-main-text { font-size: 2.2rem; }
.footer-logo .logo-sub-text { font-size: 0.75rem; }

.footer-tagline {
    color: var(--radical-light);
    opacity: 0.9;
    line-height: 1.5;
    font-size: 0.95rem;
}

.footer-title {
    color: var(--radical-orange);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-title i { font-size: 1rem; }

.contact-details-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}

.contact-details-block:last-child { margin-bottom: 0; }

.site-footer .contact-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    color: var(--radical-light);
    font-size: 0.88rem;
    line-height: 1.3;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.site-footer .contact-item i {
    color: var(--radical-orange);
    width: 16px;
    text-align: center;
}

.expertise-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.expertise-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--radical-light);
    font-size: 0.9rem;
}

.expertise-item i {
    color: var(--radical-orange);
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
}

.footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
}

@media (max-width: 1280px) {
    .footer-bottom-content { flex-wrap: wrap; justify-content: center; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; }
    .footer-link-group { flex-wrap: wrap; justify-content: center; }
    .footer-link-group + .footer-link-group { padding-left: 0; border-left: none; }
}

@media (max-width: 900px) {
    .footer-links { flex-direction: column !important; gap: 0.75rem !important; width: 100%; }
    .footer-link-group { gap: 0.75rem 1.25rem !important; width: 100%; }
}

.footer-bottom p {
    color: var(--radical-light);
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    flex-wrap: nowrap;
    align-items: center;
}

.footer-link-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5rem;
    align-items: center;
}

.footer-link-group + .footer-link-group {
    padding-left: 2.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .footer-link-group + .footer-link-group { padding-left: 0; border-left: none; }
}

.footer-link {
    color: var(--radical-light);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.footer-link:hover { color: var(--radical-orange); }
.footer-link i { font-size: 0.8rem; }

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        text-align: center;
    }
    .footer-logo .logo-redesign {
        transform: scale(1);
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-bottom-content { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
}

/* =============================================================
   Packages page
   ============================================================= */
.packages-hero {
  padding: 2rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.packages-hero h1 {
  color: var(--radical-orange);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.packages-hero .repo-url {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--radical-grey);
}

.packages-hero .repo-url a { font-weight: 600; }

.packages-section {
  padding: 1.5rem 0;
  border-bottom: 1px solid #eee;
}

.packages-section:last-child { border-bottom: none; }

.packages-section h2 {
  color: var(--radical-dark);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.packages-section--muted { color: var(--radical-grey); }

.packages-section p { margin-bottom: 0.75rem; }

.packages-section pre {
  background: var(--radical-dark);
  color: #e0e0e0;
  padding: 1rem 1.25rem;
  border-radius: 0.4rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.packages-section pre code {
  color: inherit;
  background: none;
  padding: 0;
  font-size: inherit;
}

.packages-section code {
  background: var(--radical-light-grey);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.verify-hint { margin-top: 1rem; }

/* Setup steps */
.setup-steps { display: flex; flex-direction: column; gap: 1.25rem; }

.setup-step { display: flex; gap: 1rem; align-items: flex-start; }

.step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--radical-orange);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

.step-content { flex: 1; min-width: 0; }
.step-content h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--radical-dark); }

/* Distro tabs (pure CSS) */
.distro-tabs { margin-top: 0.25rem; }
.distro-tabs input[type="radio"] { display: none; }

.distro-tabs label {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--radical-tab-grey);
  border: 1px solid var(--radical-tab-border);
  border-bottom: none;
  border-radius: 0.3rem 0.3rem 0 0;
  margin-right: 0.2rem;
  color: var(--radical-grey);
  font-weight: 500;
}

.distro-tabs input[type="radio"]:checked + label {
  background: var(--radical-dark);
  color: #fff;
  border-color: var(--radical-dark);
}

.tab-panel { display: none; }

#tab-bookworm:checked ~ #panel-bookworm,
#tab-bullseye:checked ~ #panel-bullseye,
#tab-trixie:checked ~ #panel-trixie { display: block; }

.tab-panel pre { border-radius: 0 0.4rem 0.4rem 0.4rem; margin-top: 0; }

/* Info card */
.info-card {
  border: 1px solid var(--radical-tab-border);
  border-radius: 0.4rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.info-card-header {
  background: var(--radical-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.info-card-body { padding: 0.75rem 1rem; }

.key-detail {
  display: flex;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--radical-light-grey);
  font-size: 0.9rem;
}

.key-detail:last-child { border-bottom: none; }

.key-label {
  flex-shrink: 0;
  width: 7rem;
  font-weight: 600;
  color: var(--radical-grey);
}

.key-value { flex: 1; }

.key-value code {
  background: var(--radical-light-grey);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.fingerprint code { letter-spacing: 0.05em; }

/* Packages table */
.packages-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.packages-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: var(--radical-light-grey);
  border-bottom: 2px solid var(--radical-tab-border);
  color: var(--radical-grey);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.packages-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--radical-light-grey);
}

.packages-table tbody tr:hover { background: var(--radical-tab-grey); }

/* Link to the package catalogue (/catalogue/ on cdn.radsys.io) */
.catalog-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--radical-tab-border);
  border-left: 4px solid var(--radical-orange);
  border-radius: 0.35rem;
  background: var(--radical-light-grey);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.catalog-link:hover {
  background: var(--radical-tab-grey);
  border-color: var(--radical-orange);
}

.catalog-link-icon {
  font-size: 1.5rem;
  color: var(--radical-orange);
  flex-shrink: 0;
}

.catalog-link-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.catalog-link-title {
  font-weight: 600;
  color: var(--radical-dark);
}

.catalog-link-url {
  font-size: 0.85rem;
  color: var(--radical-grey);
  word-break: break-all;
}

.catalog-link-arrow {
  margin-left: auto;
  color: var(--radical-orange);
  flex-shrink: 0;
}
