:root{
    --bg:#f4f7fb;
    --panel:#ffffff;
    --text:#111827;
    --muted:#6b7280;
    --border:#dbe3ef;
    --primary:#2563eb;
    --primary-hover:#1d4ed8;
    --danger:#b91c1c;
    --success:#047857;
    --warning:#b45309;
    --shadow:0 10px 30px rgba(0,0,0,.08);
}

body.dark{
    --bg:#0f172a;
    --panel:#111827;
    --text:#f3f4f6;
    --muted:#9ca3af;
    --border:#1f2937;
    --primary:#3b82f6;
    --primary-hover:#60a5fa;
    --danger:#ef4444;
    --success:#10b981;
    --warning:#f59e0b;
    --shadow:0 10px 30px rgba(0,0,0,.35);
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:Arial,Helvetica,sans-serif;
    line-height:1.5;
}

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

a:hover{
    text-decoration:underline;
}

.container{
    width:min(1200px,95%);
    margin:0 auto;
    padding:20px 0 50px;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    margin-bottom:20px;
}

.logo{
    display:flex;
    align-items:center;
    gap:12px;
}

.logo-icon{
    width:50px;
    height:50px;
    border-radius:14px;
    background:linear-gradient(135deg,#2563eb,#0ea5e9);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:24px;
    box-shadow:var(--shadow);
}

.logo h1{
    margin:0;
    font-size:28px;
}

.logo p{
    margin:2px 0 0;
    color:var(--muted);
    font-size:14px;
}

.top-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    background:var(--primary);
    color:#fff;
    border:none;
    padding:10px 16px;
    border-radius:12px;
    cursor:pointer;
    font-weight:600;
    transition:.2s;
    text-decoration:none;
}

.btn:hover{
    background:var(--primary-hover);
    text-decoration:none;
}

.hero{
    background:linear-gradient(135deg,#1d4ed8,#0ea5e9);
    color:#fff;
    border-radius:24px;
    padding:40px;
    margin-bottom:24px;
    box-shadow:var(--shadow);
}

.hero h2{
    margin:0 0 12px;
    font-size:40px;
    line-height:1.1;
}

.hero p{
    margin:0;
    max-width:850px;
    font-size:18px;
    opacity:.95;
}

.grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin-bottom:24px;
}

.card{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:22px;
    padding:22px;
    box-shadow:var(--shadow);
}

.card h3{
    margin-top:0;
    margin-bottom:12px;
    font-size:20px;
}

.card ul{
    margin:0;
    padding-left:18px;
}

.card li{
    margin-bottom:8px;
}

.alert{
    border-left:5px solid var(--danger);
}

.safe{
    border-left:5px solid var(--success);
}

.warning{
    border-left:5px solid var(--warning);
}

.section{
    margin-top:28px;
}

.section-title{
    margin-bottom:16px;
}

.section-title h2{
    margin:0;
    font-size:28px;
}

.section-title p{
    margin:6px 0 0;
    color:var(--muted);
}

.accordion{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.accordion-item{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:18px;
    overflow:hidden;
    box-shadow:var(--shadow);
}

.accordion-header{
    cursor:pointer;
    padding:18px 22px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    font-weight:700;
    user-select:none;
}

.accordion-header:hover{
    background:rgba(37,99,235,.05);
}

.accordion-content{
    display:none;
    padding:0 22px 22px;
    border-top:1px solid var(--border);
}

.accordion-item.active .accordion-content{
    display:block;
}

.accordion-item.active .arrow{
    transform:rotate(90deg);
}

.arrow{
    transition:.2s;
    font-size:18px;
}

.resource-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px;
}

.resource-link{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:18px;
    padding:18px;
    box-shadow:var(--shadow);
}

.resource-link h3{
    margin-top:0;
    margin-bottom:10px;
}

.footer{
    margin-top:40px;
    text-align:center;
    color:var(--muted);
    font-size:13px;
}

.search-box{
    margin-top:20px;
}

.search-box input{
    width:100%;
    padding:14px 16px;
    border-radius:14px;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--text);
    font-size:15px;
}

.pill-row{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:18px;
}

.pill{
    background:rgba(255,255,255,.15);
    border:1px solid rgba(255,255,255,.25);
    color:#fff;
    padding:8px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:600;
}


/* base hidden (phones) */
#scrollTop {
  position: fixed;
  right: 20px;
  bottom: 24px;
  padding: 10px 12px;
  font-size: 18px;
  border: none;
  border-radius: 14px;
  background: #dd2c24;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
  z-index: 9999;
}

/* show on tablet & up (adjust breakpoint as desired) */
@media (min-width: 768px) {
  #scrollTop { /* available but still hidden until scrolled */
    pointer-events: auto;
  }
}

/* visible state */
#scrollTop.visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-note{
    font-size:12px;
    color:var(--muted);
    text-align:center;
    margin-top:14px;
}


/* ====== CUSTOM RESOURCES ====== */
.custom-resource-block {
    width:100%;
    margin:16px auto;
    padding:6px;
    border-radius:14px;
    //border:1px solid var(--border);
    background:var(--panel);
    color:var(--text);
    font-size:16px;
}
.custom-resource-block h3{
    margin-top:0;
}

.custom-resource-block p{
    margin-bottom:14px;
}

.custom-resource-block ul{
    padding-left:20px;
}

.custom-resource-block li{
    margin-bottom:8px;
}


@media (max-width: 900px){

    .grid{
        grid-template-columns:1fr;
    }

    .resource-grid{
        grid-template-columns:1fr;
    }

    .hero{
        padding:28px;
    }

    .hero h2{
        font-size:32px;
    }
}

@media (max-width: 700px){

    .topbar{
        flex-direction:column;
        align-items:flex-start;
    }

    .top-actions{
        width:100%;
    }

    .btn{
        width:100%;
    }

    .hero h2{
        font-size:28px;
    }

    .hero p{
        font-size:16px;
    }
}
