/* ==========================================================
   Interactive Human Anatomy Atlas — tool page
   Self-contained styling (does not import the main site's
   assets/css/style.css) so this tool's markup can never be
   affected by, or accidentally affect, the main site's CSS.
   Brand tokens below are copied from the main site's :root
   so the page still reads as part of DrND's Knowledge Hub.
==========================================================*/

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

:root{
    --primary:#1E3A8A;
    --secondary:#2563EB;
    --gold:#D4AF37;
    --white:#ffffff;
    --light:#F8FAFC;
    --gray:#6B7280;
    --dark:#111827;
    --shadow:0 12px 40px rgba(0,0,0,.08);
    --radius:18px;
    --transition:.35s ease;
    --max-width:1100px;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Inter',sans-serif;
    background:var(--light);
    color:var(--dark);
    line-height:1.7;
}

h1,h2,h3{
    font-family:'Poppins',sans-serif;
    font-weight:700;
    color:var(--dark);
    line-height:1.25;
}

p{
    color:var(--gray);
    font-size:1.05rem;
}

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

a:hover{
    color:var(--primary);
}

.container{
    width:min(92%,var(--max-width));
    margin:auto;
}

/* ---------- Brand bar ---------- */

.brand-bar{
    background:var(--white);
    border-bottom:1px solid rgba(30,58,138,.08);
    padding:18px 0;
}

.brand-bar .container{
    display:flex;
    align-items:center;
    gap:14px;
}

.brand-bar img{
    width:44px;
    height:44px;
    border-radius:50%;
    object-fit:contain;
}

.brand-bar .brand-name{
    font-weight:700;
    color:var(--dark);
    font-size:1.05rem;
}

.brand-bar .brand-tagline{
    display:block;
    color:var(--gold);
    font-size:.78rem;
    font-weight:600;
}

/* ---------- Page hero ---------- */

.tool-hero{
    padding:60px 0 40px;
    background:linear-gradient(135deg,#0F172A 0%,#1E3A8A 55%,#2563EB 100%);
    color:var(--white);
}

.tool-hero .page-badge{
    display:inline-block;
    padding:8px 18px;
    border-radius:30px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.25);
    font-size:14px;
    font-weight:600;
    margin-bottom:22px;
}

.tool-hero h1{
    color:var(--white);
    font-size:2.25rem;
    margin-bottom:18px;
    max-width:760px;
}

.tool-hero p{
    color:rgba(255,255,255,.85);
    max-width:700px;
    font-size:1.05rem;
}

/* ---------- Viewer frame ---------- */

.viewer-section{
    padding:40px 0 10px;
}

.viewer-frame{
    width:100%;
    height:min(78vh,800px);
    min-height:460px;
    border:1px solid rgba(30,58,138,.12);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow:hidden;
    background:#f3f4f4;
}

.viewer-frame iframe{
    width:100%;
    height:100%;
    border:0;
    display:block;
}

.viewer-loading-note{
    margin-top:14px;
    font-size:.85rem;
    color:var(--gray);
    text-align:center;
}

/* ---------- Content sections ---------- */

.tool-content{
    padding:60px 0;
}

.tool-content + .tool-content{
    padding-top:0;
}

.tool-content h2{
    font-size:1.6rem;
    margin-bottom:16px;
}

.tool-content-inner{
    max-width:800px;
}

.tool-content ul{
    margin:10px 0 0 22px;
    color:var(--gray);
}

.tool-content li{
    margin-bottom:10px;
    font-size:1.05rem;
}

.attribution-box{
    background:var(--white);
    border:1px solid rgba(30,58,138,.1);
    border-radius:var(--radius);
    padding:28px 30px;
    box-shadow:var(--shadow);
}

.attribution-box h3{
    font-size:1.1rem;
    margin-bottom:10px;
    color:var(--primary);
}

.attribution-box p{
    font-size:.95rem;
    margin-bottom:14px;
}

.attribution-box p:last-child{
    margin-bottom:0;
}

.attribution-box a{
    word-break:break-word;
    /* inline links need a cue other than colour (WCAG 1.4.1) */
    text-decoration:underline;
    text-underline-offset:2px;
}

.disclaimer-note{
    display:flex;
    gap:10px;
    align-items:flex-start;
    background:#F8FAFC;
    border:1px solid rgba(107,114,128,.2);
    border-radius:12px;
    padding:14px 18px;
    font-size:.88rem;
    color:var(--gray);
    max-width:800px;
}

.disclaimer-note i{
    color:var(--gold);
    margin-top:2px;
}

.back-home{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-weight:600;
    margin-bottom:8px;
}

/* ---------- Footer ---------- */

.tool-footer{
    padding:30px 0 50px;
    text-align:center;
    color:var(--gray);
    font-size:.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width:768px){

    .tool-hero{
        padding:45px 0 32px;
    }

    .tool-hero h1{
        font-size:1.7rem;
    }

    .viewer-frame{
        height:min(70vh,620px);
        min-height:380px;
        border-radius:12px;
    }

    .tool-content{
        padding:45px 0;
    }
}
