
:root{ --link:#0b63c5; --panel:#fff; --text:#111; }
*{ box-sizing:border-box }
body{ margin:0; font:16px/1.6 Arial, Helvetica, sans-serif; color:var(--text);
  background: url('images/door-to-door-salesman-site-background.jpg') top center no-repeat, #e9f2fb;
  background-size: 1400px auto; }
.container{ max-width: 1100px; margin: 0 auto; padding: 12px; }

.masthead{ display:flex; align-items:center; gap:16px;
  background: url('images/door-to-door-salesman-site-background.jpg') center top no-repeat; background-size: 100% auto;
  border-radius:12px; padding:12px 16px; margin:6px 0 10px; min-height:110px; }

.logo-wrap{ width:240px; height:120px; padding:6px 12px; border-radius:16px;
  background:#fff; box-shadow:0 2px 10px #0002; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.logo-wrap img{ max-width:100%; max-height:100%; object-fit:contain; display:block; }

.masthead .titles{ text-align:left; color:#fff; text-shadow: 0 1px 3px #000; }
.hero-title{ margin:0; font-size:26px; line-height:1.12; font-weight:700; }
.page-subtitle{ margin:2px 0 0; font-size:26px; line-height:1.12; font-weight:700; color:#f5f7ff; }

.breadcrumb{ font-size:13px; margin: 6px 0 8px; color:#123 }
.searchbar{ display:flex; gap:6px; margin:6px 0 12px }
.searchbar input{ flex:1; padding:8px 10px; border:1px solid #bcd; border-radius:8px }
.searchbar button{ padding:8px 12px; border-radius:8px; border:1px solid #5aa0e6; background:#eaf4ff }

.layout{ display:grid; grid-template-columns: 220px 1fr 240px; gap:14px; }
aside, main{ background:var(--panel); border-radius:10px; padding:12px; box-shadow:0 1px 6px #0001 }
.left ul, .right ul{ list-style:none; padding:0; margin:0 }
.left a, .right a{ display:block; padding:8px 10px; border-radius:8px; color:var(--link); text-decoration:none }
.left a:hover, .right a:hover{ background:#f2f7ff }
.right img.icon{ width:24px; height:auto; vertical-align:middle; margin-right:8px }

.adbox{ margin-top:12px; min-height:220px; border:1px dashed #9bb; border-radius:10px; display:flex; align-items:center; justify-content:center; color:#567; font-size:14px; background:#fff; }
footer{ text-align:center; color:#334; padding:20px 0 }

@media (max-width: 900px){
  .container{ max-width: 94vw; }
  .layout{ grid-template-columns: 1fr; }
  .masthead{ flex-direction:column; align-items:flex-start; }
  .masthead .titles{ text-align:center; width:100% }
  .logo-wrap{ width:200px; height:110px; }
}


/* Search results */
.search-results{ margin: 8px 0 12px; }
.search-results .hit{ background:#fff; border:1px solid #dce6f5; border-radius:10px; padding:10px 12px; margin:6px 0; box-shadow:0 1px 3px #0001; }
.search-results .hit a{ font-weight:bold; text-decoration:none; color:#0b63c5; }
.search-results .hit .path{ font-size:12px; color:#4b6177; margin-top:4px; }
.search-results .hit .snippet{ font-size:14px; color:#213244; margin-top:6px; }


/* ---- Mobile-first responsive improvements ---- */
:root{
  --mobile-pad: 12px;
}

/* general */
img, video{max-width:100%;height:auto}

/* Shrink hero and title on small screens */
@media (max-width: 768px){
  .hero{padding:18px 0}
  .hero .brand{gap:10px}
  .hero .brand img{width:120px;height:auto}
  .hero-title{font-size:26px; line-height:1.2; text-align:center}
  .site-subtitle{font-size:12px; text-align:center}
}

/* Layout: stack columns */
@media (max-width: 900px){
  .layout{
    display:block;
  }
  .left-col, .right-col, .center-col{
    width:auto; max-width:100%;
    margin: var(--mobile-pad) 0;
  }
}

/* Left nav: collapsible on phones */
.hamburger{
  display:none;
  border:0; background:#0b63c5; color:#fff; font-size:20px;
  padding:8px 12px; border-radius:8px; box-shadow:0 2px 4px #0002;
}
@media (max-width: 900px){
  .hamburger{display:inline-block; margin:8px}
  #left-nav{
    position:fixed; top:0; left:-280px; width:260px; height:100vh; overflow:auto;
    background:#f9fbff; box-shadow:2px 0 12px #0003; padding:14px;
    transition:left .25s ease; z-index:9999;
  }
  #left-nav.open{ left:0; }
  body.menu-open{ overflow:hidden; }
  .nav-card{box-shadow:none; border-radius:0}
}

/* Tap targets & menu spacing */
.nav-card a{
  display:block; padding:12px 10px; border-radius:10px;
}
@media (max-width: 768px){
  .nav-card a{padding:14px 12px; font-size:16px}
}

/* Right rail stacks under content */
@media (max-width: 900px){
  .aside-card{ order:3; }
}

/* Search bar sticky on mobile */
@media (max-width: 900px){
  .search-wrap{
    position:sticky; top:0; z-index:500; padding:8px 0;
    background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.85));
    backdrop-filter:saturate(1.2) blur(4px);
  }
  #search input[type="text"], #search input[type="search"]{
    font-size:16px;
  }
}

/* Pills wrap nicely */
.link-grid{ display:flex; flex-wrap:wrap; gap:8px }
.link-grid .pill{ padding:.45rem .65rem; }

/* Breadcrumb scroll if long */
.breadcrumbs{ overflow-x:auto; white-space:nowrap }
.breadcrumbs a{ display:inline-block; padding:8px 0 }

/* Tables responsive */
.table-responsive{ width:100%; overflow-x:auto }
.table-responsive table{ min-width:600px }

/* Fancy pill buttons for topic nav */
.link-grid{ display:flex; flex-wrap:wrap; gap:10px; margin:10px 0 16px; }
.pill{
  display:inline-block; text-decoration:none; border:1px solid #bcd; border-radius:999px;
  padding:.5rem .85rem; background:#f7fbff; color:#0b3f6b;
  box-shadow:0 1px 2px #0001, inset 0 0 0 1px #fff;
  transition:transform .05s ease, box-shadow .2s ease, background .2s;
}
.pill.fancy{
  background:linear-gradient(180deg, #ffffff, #eef6ff);
  border-color:#a9c7ff;
}
.pill:hover{ transform:translateY(-1px); box-shadow:0 3px 6px #0002, inset 0 0 0 1px #fff; }

