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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    padding-top: 60px;
    background-color: #c8cdd2;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Everything between the navbar and the footer. <body> is a column flexbox (it
   keeps the footer at the bottom), and a flex item centred with auto margins is
   sized by its widest unbreakable line: one long line of code made the whole
   page scroll sideways. Inside this box a page is an ordinary block again. */
.site-main { flex: 1 0 auto; width: 100%; min-width: 0; }

/* ── Navbar ── */
.navbar {
    background-color: rgb(199, 201, 214);
    padding: 0.75rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
}

.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-weight: 800;
    text-decoration: none;
    font-size: 1.8rem;
    color: #111;
    letter-spacing: -0.01em;
}

/* Navbar colours re-picked 2026-10-31 for WCAG contrast against the navbar and the
   darker terminal/bandwidth navbar gradients; each comment gives the old value. */
.logo span { color: #33679B; }   /* large text, >=3.3:1 (#3D7AB8 was 2.5-2.7) */

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    color: #222;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links li a:hover { color: #111; }   /* the underline shows hover (#4CAF50 text was 1.7:1) */

.nav-links li a:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #317134;   /* >=3.3:1 (#4CAF50 was 1.7) */
}

.nav-links li a.active { color: #2C46A6; }   /* >=4.6:1 (#3250bd was 3.9-4.2) */

.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #317134;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    touch-action: manipulation;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: #222;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* ── Apps dropdown (logged-in users; shown on every screen size) ── */
.apps-menu {
    position: relative;
    margin-right: auto;          /* sit just right of the logo */
    margin-left: 1.25rem;
}

.apps-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* solid blue body with a glossy sheen highlight on top (no body gradient) */
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.12) 45%, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, 0.06) 100%),
        #306FB7;   /* white label 5.1:1, 4.5 on hover (#3f82cd was 4.0) */
    border: 1px solid #1b4684;
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        inset 0 -2px 4px rgba(0, 0, 0, 0.28),
        0 1px 2px rgba(0, 0, 0, 0.3);
    transition: filter 0.15s, box-shadow 0.15s;
    touch-action: manipulation;
}

.apps-toggle:hover { filter: brightness(1.08); }

.apps-toggle:active,
.apps-menu.open .apps-toggle {
    /* pressed-in metal look */
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    filter: brightness(0.96);
}

.apps-bars {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 13px;
}

.apps-bars span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.apps-menu.open .apps-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.apps-menu.open .apps-bars span:nth-child(2) { opacity: 0; }
.apps-menu.open .apps-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.apps-dropdown {
    list-style: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 210px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    padding: 0.4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1002;
}

.apps-menu.open .apps-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.apps-dropdown li { display: block; }

.apps-dropdown li a {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: 7px;
    color: #222;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

.apps-dropdown li a:hover { background: #eef3f8; color: #33679B; }   /* 5.3:1 (#3D7AB8 was 4.0) */
.apps-dropdown li a.active { color: #3250bd; background: #eef1fb; }

/* ── Cards Section ── */
.cards-section {
    background-color: rgb(40, 140, 190);
    padding: 1.5rem 0;
    margin-top: 0;
    text-align: center;
    box-shadow:
        inset 0 8px 12px -4px rgba(0, 0, 0, 0.6),
        inset 0 -8px 12px -4px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.cards-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.cards-section h2 {
    color: white;
    font-size: 1.7rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.languages-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
}

.language-card {
    background: linear-gradient(160deg, #c9dbe4 0%, #a8bfcc 45%, #8ba2b3 100%);
    color: #333;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.8),
        inset 0 -3px 4px rgba(0, 0, 0, 0.25),
        inset 1px 0 1px rgba(255, 255, 255, 0.3),
        inset -1px 0 2px rgba(0, 0, 0, 0.15);
    padding: 0.65rem;
    width: 115px;
    height: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.language-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.9),
        inset 0 -3px 4px rgba(0, 0, 0, 0.3),
        inset 1px 0 1px rgba(255, 255, 255, 0.35),
        inset -1px 0 2px rgba(0, 0, 0, 0.18);
}

.language-card h4 { font-size: 0.85rem; margin-bottom: 0.35rem; }

/* "Full illustration" cards (ANSI C, PHP, HTML/CSS JS, Cisco, and any more
   added later): no padding, no background, no title — the card's own
   custom image IS the entire card, filling every pixel (object-fit:cover,
   no letterbox gaps). Deliberately NOT styled to match the other cards'
   simple single-logo look. Sizing comes straight from the base
   .language-card's explicit width/height (set once, shared by every
   card) — earlier this relied on flexbox align-items:stretch matching
   the tallest sibling's auto height instead, which broke as soon as a
   tall-titled card (Cisco's 2-line title) got converted to icon-only and
   there was no more tall content left to stretch against. An explicit
   height sidesteps that fragility entirely.

   Compound .language-card.language-card--icon-only selector used
   throughout (2 classes) instead of .language-card--icon-only alone (1
   class) so these rules always beat the plain .language-card / .language-
   card img rules below on specificity, regardless of source order — a
   same-specificity, later-wins bug here previously caused the image to
   render at the generic icon size instead of filling the card. */
.language-card.language-card--icon-only {
    position: relative;
    padding: 0;
    background: none;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.language-card.language-card--icon-only:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

/* The image covers the card completely, so a regular inset box-shadow on
   the card itself would be painted underneath it and never show. This
   pseudo-element paints on top of the image instead, giving the same
   raised-bevel highlight/shadow rim the other cards get. */
.language-card.language-card--icon-only::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 13px;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.8),
        inset 0 -3px 4px rgba(0, 0, 0, 0.35),
        inset 1px 0 1px rgba(255, 255, 255, 0.3),
        inset -1px 0 2px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.language-card.language-card--icon-only picture {
    position: absolute;
    inset: 0;
}

.language-card.language-card--icon-only img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modifier for "full illustration" cards whose source image's aspect
   ratio is too different from the card box to crop with object-fit:cover
   without cutting off important content (e.g. Cisco's wide logo text) —
   use object-fit:contain instead so the whole image shows uncropped, with
   a background color sampled from the image's own background filling
   the leftover letterbox gaps instead of showing raw page background. */
.language-card.language-card--icon-only.language-card--icon-contain {
    background: #d9d7dc;
}

.language-card.language-card--icon-only.language-card--icon-contain img {
    object-fit: contain;
}

.language-card img { width: 52px; height: 52px; object-fit: contain; }

/* ── Main Content ── */
.container {
    max-width: 1280px;
    margin: 1rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    flex: 1;
}

.link-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 0.5rem;
}

@media (min-width: 769px) {
    #techradar-feed { border-right: 1px solid #eee; padding-right: 1rem; }
    #techplanet-feed { padding-left: 1rem; }
}

/* ── Django messages ── */
.messages {
    max-width: 1280px;
    margin: 1rem auto 0;
    padding: 0 1.5rem;
    list-style: none;
}

.messages li {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
}

.messages li.success { background: #c6f6d5; color: #22543d; border: 1px solid #9ae6b4; }
.messages li.error   { background: #fed7d7; color: #742a2a; border: 1px solid #fc8181; }
.messages li.warning { background: #fefcbf; color: #744210; border: 1px solid #f6e05e; }
.messages li.info    { background: #bee3f8; color: #2a4365; border: 1px solid #90cdf4; }

/* ── Footer ── */
.footer-wrap {
    background: #4a5c6a;
    border-top: 3px solid #3a4c5a;
    font-family: Arial, sans-serif;
    margin-top: auto;
}

.footer-constrain { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    border-bottom: 2px solid #5a6c7a;
}

.footer-col {
    padding: 2rem 1.5rem;
    border-right: 1px solid #5a6c7a;
}
.footer-col:last-child { border-right: none; }

.wordmark {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
    text-decoration: none;
}
.wordmark .boz  { color: #f0f0f0; }
.wordmark .code { color: #a8d4f0; }

.brand-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #c9d4dd;   /* 4.6:1 on the footer (#c0d0dc was 4.4) */
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
}

.brand-desc {
    font-size: 0.82rem;
    color: #d0dde6;
    line-height: 1.7;
    max-width: 220px;
}

.stack-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.2rem; }

.pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #e0eef8;
    border: 1px solid #6a7c8a;
    background: #3a4c5a;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.col-heading {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #e0eef8;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #a8c4d8;
    display: inline-block;
}

.footer-col .link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0;
}

.footer-col .link-list li a {
    text-decoration: none;
    font-size: 0.85rem;
    color: #d0dde6;
    font-weight: 400;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-col .link-list li a:hover { color: #ffffff; }

.link-arrow { font-size: 0.7rem; color: #a8c4d8; transition: color 0.15s; }
.footer-col .link-list li a:hover .link-arrow { color: #ffffff; }

.img-frame {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 2px solid #111;
    box-shadow: 4px 4px 0 #3D7AB8;
    overflow: hidden;
    background: #0a1520;
    margin-bottom: 0.75rem;
}

.img-frame img,
.img-frame svg { width: 100%; height: 100%; display: block; object-fit: cover; }

.img-caption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #3a5470;
    letter-spacing: 0.03em;
}

.footer-bottom-bar { background: #3a4c5a; }

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

.footer-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: #c9d4dd;   /* 4.6:1 (#a0b4c4 was 3.2) */
    letter-spacing: 0.02em;
}
.footer-copy span { color: #e0eef8; }

.social-links { display: flex; gap: 1rem; }
.social-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: #c9d4dd;   /* 4.6:1 (#a0b4c4 was 3.2) */
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.15s;
}
.social-links a:hover { color: #ffffff; }

@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-col:nth-child(2) { border-right: none; }
}

@media (max-width: 560px) {
    .footer-inner { grid-template-columns: 1fr; }
    .footer-col { border-right: none; border-bottom: 1px solid #1e2c42; }
    .footer-col:last-child { border-bottom: none; }
    .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-links {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: rgb(233, 234, 243);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active { max-height: 400px; }

    .nav-links li a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        font-size: 1rem;
    }

    .nav-links li a.active::after { display: none; }
}

@media (max-width: 480px) {
    .container {
        margin: 0.75rem;
        padding: 1rem;
        border-radius: 6px;
        max-width: none;
        width: calc(100% - 1.5rem);
    }

    .navbar { padding: 0.75rem 1rem; }
    .cards-section h2 { font-size: 1.5rem; }

    /* compact the Apps toggle on phones: icon only, snug to the logo */
    .apps-menu { margin-left: 0.75rem; }
    .apps-label { display: none; }
    .apps-toggle { padding: 0.4rem 0.55rem; }
    .apps-dropdown { left: 0; min-width: 190px; }

    .language-card { width: 88px; height: 101px; padding: 0.55rem; }
    .language-card img { width: 40px; height: 40px; }

    .language-card.language-card--icon-only { padding: 0; }
    .language-card.language-card--icon-only img { width: 100%; height: 100%; }
}

.nav-logout-form { display: contents; }
.nav-logout-btn {
    background: none;
    border: none;
    padding: 0;
    color: #222;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
}

/* ── .page-wrapper pages on phones (2026-11-23) ──
   <body> is a column flexbox and .page-wrapper centres itself with auto margins,
   which sizes it to its CONTENT: one long line of code made the page up to 485px
   too wide for a phone. A definite width lets code and tables scroll inside their
   own box; each page's max-width still caps it on desktop. */
.page-wrapper { width: 100%; }
/* the table's own margin sits on the box (as a scroll container it would no longer
   collapse with the paragraph above, adding 12px) */
.page-wrapper .table-scroll { overflow-x: auto; margin-top: 0.75rem; }
.page-wrapper .table-scroll > table { margin-top: 0; }
.page-wrapper :not(pre, td, th) > code { overflow-wrap: anywhere; }

/* ── Keyboard focus on boxes that scroll (js/scroll-focus.js, 2026-11-23) ──
   Two colours, so the ring shows on dark code and on white tables alike; drawn
   inside the box because some cards clip what sticks out. */
:is(.page-wrapper, .bowl-page) [data-scroll-focus]:focus-visible {
    outline: 3px solid #1e5fbf;
    outline-offset: -3px;
    box-shadow: inset 0 0 0 5px #fff;
}
