/* radcomplete.com — site-wide styles (layout, navigation, typography, home, text pages, contact) */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    display: flex;
    flex-direction: column;
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
}

/* Header & navigation (templates/partials/nav.html, static/js/nav.js) */
header { background-color: #000; padding: 0.9rem 2rem; position: relative; z-index: 20; }
nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
a.brand { display: block; color: #fff; text-decoration: none; flex: 0 0 auto; }
a.brand img { display: block; height: 34px; width: auto; }
.nav-toggle { display: none; }
.menu { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; justify-content: flex-end; }
.menu-group { position: relative; }
.menu .pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem 0.45rem 1rem;
    border: 1px solid #3a3a3a;
    border-radius: 999px;
    background: #1a1a1a;
    color: #e8e8e8;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.menu .pill .chev { transition: transform 0.15s; }
.menu .pill:hover, .menu-group:hover > .pill, .menu-group.open > .pill { border-color: #7cc4ff; color: #fff; background: #222; }
.menu-group:hover > .pill .chev, .menu-group.open > .pill .chev { transform: rotate(180deg); }
.menu .pill.active { border-color: #0066cc; color: #fff; box-shadow: inset 0 0 0 1px #0066cc; }
.menu .pill:focus-visible { outline: 2px solid #7cc4ff; outline-offset: 2px; }

.dropdown {
    list-style: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 13rem;
    padding: 0.4rem;
    background: #161616;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 30;
}
/* Invisible bridge so the pointer can travel from pill to panel without closing it. */
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.menu-group.open > .dropdown { display: block; }
@media (hover: hover) { .menu-group:hover > .dropdown { display: block; } }
.dropdown a {
    display: block;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    color: #e8e8e8;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
}
.dropdown a:hover { background: #262626; color: #fff; }
.dropdown a[aria-current="page"] { background: #0066cc; color: #fff; }
.dropdown a:focus-visible { outline: 2px solid #7cc4ff; outline-offset: -2px; }

/* Main content */
main {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}
main h1 { font-size: 1.7rem; margin-bottom: 0.6rem; }
main h2 { font-size: 1.2rem; margin: 1.2rem 0 0.5rem; }
main h3 { font-size: 1.05rem; margin: 1rem 0 0.4rem; }
main p, main li { line-height: 1.5; }
main a { color: #7cc4ff; }
.lede { color: #ccc; margin-bottom: 1rem; max-width: 720px; }
.small { font-size: 0.85rem; color: #bbb; }
.error { color: #ff6b6b; }
.text-page { max-width: 720px; margin: 0 auto; }
.text-page ul { padding-left: 1.2rem; margin: 0.5rem 0 1rem; }
.text-page li { margin: 0.4rem 0; }

/* Footer */
footer { background-color: #000; padding: 1rem 2rem; text-align: center; font-size: 0.9rem; }
footer p { margin: 0.2rem 0; color: #aaa; }
footer a { color: #aaa; }

/* Home cards */
.home { max-width: 900px; margin: 0 auto; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 0.9rem 1.1rem 0.9rem 0.8rem;
    color: #fff;
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: #0066cc; transform: translateY(-2px); }
.card-icon { flex: 0 0 auto; width: 72px; height: 72px; mix-blend-mode: lighten; }
.card-body { min-width: 0; }
.card h3 { margin: 0; font-size: 1rem; color: #7cc4ff; }
.home-group { margin-top: 1.6rem; }
.home-group > h2 { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8a8a; margin: 0 0 0.2rem; padding-bottom: 0.4rem; border-bottom: 1px solid #2a2a2a; }
.home-group .card-grid { margin-top: 0.8rem; }
.card p {
    margin: 0; color: #aaa; font-size: 0.85rem; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-notes { margin-top: 1.5rem; color: #ccc; max-width: 720px; }

/* Reference tables and citation lists */
.ref-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.9rem; }
.ref-table th, .ref-table td { border: 1px solid #444; padding: 6px 8px; text-align: left; }
.ref-table th { background: #2a2a2a; }
.refs { padding-left: 1.2rem; }
.refs li { margin: 0.5rem 0; line-height: 1.45; font-size: 0.9rem; }

/* Notices */
.notice { padding: 12px 16px; border-radius: 6px; margin: 16px 0; color: #fff; }
.notice p { margin: 0.3rem 0; color: #fff; }
.notice.success { background: #143d1f; border: 1px solid #2e7d32; border-left: 4px solid #2ecc71; }
.notice.error { background: #4a1a1a; border: 1px solid #a33; border-left: 4px solid #ff6b6b; color: #ffd6d6; }
.notice a { color: #7cc4ff; }

/* Contact form (shares .calc-form / .form-group / .button-group from calculator.css) */
.contact-form { max-width: 560px; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.contact-form textarea { width: 100%; font: inherit; padding: 8px; }
.contact-form input[type="text"], .contact-form input[type="email"] { width: 100%; padding: 8px; font: inherit; }

/* Mobile */
@media (max-width: 700px) {
    header { padding: 0.8rem 1rem; }
    nav { flex-wrap: wrap; }
    .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 44px; height: 44px; margin: -6px -8px -6px 0; padding: 0;
        background: transparent; border: 0; border-radius: 8px; color: #e8e8e8; cursor: pointer;
    }
    .nav-toggle:hover { background: #1a1a1a; }
    .nav-toggle:focus-visible { outline: 2px solid #7cc4ff; }
    .nav-toggle .i-close, nav.open .nav-toggle .i-open { display: none; }
    nav.open .nav-toggle .i-close { display: block; }
    .menu { display: none; flex-basis: 100%; flex-direction: column; gap: 0.9rem; padding-top: 0.9rem; margin-top: 0.7rem; border-top: 1px solid #2a2a2a; }
    nav.open .menu { display: flex; }
    /* Every group is shown expanded; the trigger becomes a static heading. */
    .menu .pill { pointer-events: none; padding: 0; border: 0; background: none; box-shadow: none; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8a8a; }
    .menu .pill.active { color: #7cc4ff; border: 0; box-shadow: none; }
    .menu .pill .chev { display: none; }
    .dropdown, .menu-group:hover > .dropdown { display: block; position: static; min-width: 0; padding: 0.3rem 0 0; background: none; border: 0; box-shadow: none; }
    .dropdown::before { display: none; }
    .dropdown a { padding: 0.55rem 0.6rem; font-size: 1rem; }
    main { padding: 1rem; }
    .ref-table { display: block; overflow-x: auto; }
}

/* Scheduled-maintenance banner (templates/partials/maintenance_banner.html) */
.maint-banner { background: #3a2a00; border-top: 1px solid #b8860b; border-bottom: 1px solid #b8860b; color: #ffe8a3; padding: 0.55rem 2rem; font-size: 0.92rem; text-align: center; line-height: 1.4; }
.maint-banner.in-progress { background: #4a1a1a; border-color: #a33; color: #ffd6d6; }
.maint-banner strong { color: #fff; }
@media (max-width: 700px) { .maint-banner { padding: 0.5rem 1rem; font-size: 0.88rem; } }
