/* =============================================================================
   Workplace Know-How (Care for Newcomers) · the chrome and the layout of every public page
   The tokens and the shared components (buttons, cards, pills, forms, prose ...) are in theme.css, loaded right after this file.
   Here: layout helpers, the navbar and its drawer, breadcrumbs, the library and search lists, the sign-in window, the floating buttons and the
   footer. The page banner has its own stylesheet (banner.css); home-only styling lives in home.css.
   Sizes of type come from the one scale in theme.css: a section heading is var(--fs-h2), the title of a card or of a result var(--fs-h3),
   every paragraph that is read var(--fs-body), and a count, a date or the line under a title var(--fs-small). The navbar, the drawer, the
   footer links and the search suggestions are furniture and keep their own small sizes, as do buttons, pills and form labels.
   ============================================================================= */

:root{
  --ease:cubic-bezier(.2,.8,.2,1); --hdr-h:84px;
  --gutter:clamp(20px,4.5vw,88px); --maxw:1920px;
}
*,*::before,*::after{box-sizing:border-box}

/* "Tones": a block puts one logo colour to work. --c main · --cd dark (text/icons on white) · --on text on --c · --ct tint · --bd border tint · --bt button tint on --c */
.tone-plum{--c:#693A78; --cd:#693A78; --on:#FFFFFF; --ct:#EFE6F2; --bd:rgba(105,58,120,.22); --bt:rgba(255,255,255,.16)}
.tone-green{--c:#96CB5B; --cd:#46761A; --on:#13210A; --ct:#E9F2D6; --bd:#CFE3AA; --bt:rgba(255,255,255,.55)}
.tone-orange{--c:#F0AE5E; --cd:#9A4F05; --on:#2B1604; --ct:#FBEBD3; --bd:#F1D3A5; --bt:rgba(255,255,255,.55)}
.tone-blue{--c:#3EADE3; --cd:#0F6D96; --on:#06222F; --ct:#DDF0F9; --bd:#B5DCF0; --bt:rgba(255,255,255,.55)}

/* ---- Base ---------------------------------------------------------------- */
body{margin:0}
p{margin-top:0}
html{scroll-padding-top:calc(var(--hdr-h) + 12px)}   /* a focused link or a #target must not hide under the sticky navbar (WCAG 2.4.11) */
.page{display:flex; flex-direction:column; min-height:100vh}
.wrap{max-width:var(--maxw); margin:0 auto; padding-left:var(--gutter); padding-right:var(--gutter)}
main{flex:1 0 auto}

/* ---- Utilities ----------------------------------------------------------- */
.sr,.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0}
.skip{position:absolute; left:12px; top:-80px; z-index:100; background:var(--deep); color:#FFFFFF; padding:12px 20px; border-radius:999px; font-weight:700; text-decoration:none}
.skip:focus{top:12px; color:#FFFFFF}
.inline-form{display:inline; margin:0}
.linkbtn{background:none; border:0; padding:0; font:inherit; cursor:pointer}

/* ---- Navbar -------------------------------------------------------------- */
/* Beige like the page, so it looks transparent over it; a hairline appears once the page scrolls (js adds .is-stuck). Logo, a thin divider and the tagline on the left, four links and the search on the right. */
.hdr{position:sticky; top:0; z-index:60; background:var(--bg); border-bottom:1px solid transparent; transition:border-color .3s}
.hdr.is-stuck{border-bottom-color:var(--line)}
.hdr-in{position:relative; max-width:var(--maxw); margin:0 auto; padding:0 var(--gutter); height:var(--hdr-h); display:flex; align-items:center; gap:24px}
.hdr-id{display:flex; align-items:center; flex:0 1 auto; min-width:0}
.hdr-brand{display:flex; align-items:center; gap:12px; flex:none; text-decoration:none}
.hdr-brand img{display:block; height:60px; width:auto; max-width:220px; object-fit:contain}
.hdr-brand .hdr-emblem{width:44px; height:44px; max-width:none}   /* the Care for Newcomers emblem, a little smaller than the two lines of the name beside it */
/* until a logo is uploaded (Site settings > General) the site name is the logo: two lines of type, about as tall as a logo */
.hdr-word{display:flex; flex-direction:column; font:300 26px/1 var(--display); letter-spacing:-.035em; color:var(--deep)}
.hdr-word b{font-weight:300}
.hdr-word span{margin-top:3px; font-weight:600; color:var(--plum)}
.hdr-tag{position:relative; margin:0 0 0 20px; padding-left:20px; max-width:210px; font:500 13.5px/1.35 'Noto Sans',system-ui,sans-serif; color:var(--muted)}
.hdr-tag::before{content:""; position:absolute; left:0; top:50%; height:42px; border-left:1px solid var(--line-s); transform:translateY(-50%)}
.hdr-collapse{flex:1; display:flex; align-items:center; justify-content:flex-end; gap:16px; min-width:0}
.hdr-nav{display:flex; gap:2px; margin:0 0 0 auto}
.hdr-nav a{position:relative; padding:12px 14px; font:600 15px/1.2 'Noto Sans',system-ui,sans-serif; color:var(--ink); text-decoration:none; white-space:nowrap; transition:color .25s}
.hdr-nav a::after{content:""; position:absolute; left:14px; right:14px; bottom:4px; height:3px; border-radius:2px; background:var(--plum); opacity:0; transform:scaleX(.4); transform-origin:left; transition:transform .3s var(--ease),opacity .2s}
.hdr-nav a:hover,.hdr-nav a.is-active{color:var(--plum)}
.hdr-nav a:hover::after,.hdr-nav a.is-active::after{opacity:1; transform:scaleX(1)}
.hdr-tools{display:flex; align-items:center; gap:8px; flex:none}
/* Sign in (a quiet link) and Sign up (a small plum pill), for visitors who are not signed in; both open the sign-in window (js/auth.js) */
.hdr-auth{display:flex; align-items:center; gap:4px; margin-left:4px}
.hdr-signin{display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:8px 14px; border-radius:999px; font:600 15px/1.2 'Noto Sans',system-ui,sans-serif; color:var(--ink); text-decoration:none; white-space:nowrap; transition:background .2s,color .2s}
.hdr-signin:hover,.hdr-signin[aria-current]{background:var(--lilac); color:var(--plum)}
.hdr-signup{white-space:nowrap; padding-left:18px; padding-right:18px}
@media (min-width:1280px) and (max-width:1365px){   /* the narrowest desktop row: a little less air between the links, so the tagline keeps its room */
  .hdr .hdr-collapse{gap:12px}
  .hdr .hdr-nav a{padding:12px 8px} .hdr .hdr-nav a::after{left:8px; right:8px}   /* .hdr in front: wins over the 1360 px rule further down */
  .hdr .hdr-signin{padding:8px 10px} .hdr .hdr-signup{padding-left:14px; padding-right:14px}
}

/* search: an icon that opens into a field */
.hdr-search{display:flex; align-items:center; border-radius:999px; transition:background .3s}
.hdr-search input{width:0; height:40px; min-height:0; padding:0; opacity:0; visibility:hidden; border:0; outline:0; border-radius:0; box-shadow:none; background:transparent; font:500 14.5px 'Noto Sans',system-ui,sans-serif; color:var(--ink); transition:width .35s var(--ease),padding .35s var(--ease),opacity .25s,visibility 0s .35s}
.hdr-search.is-open{background:var(--lilac)}
.hdr-search.is-open input{width:190px; padding:0 6px 0 16px; opacity:1; visibility:visible; transition:width .35s var(--ease),padding .35s var(--ease),opacity .25s,visibility 0s}
.hdr-search button{width:40px; height:40px; flex:none; border:0; border-radius:50%; background:transparent; color:var(--ink); display:grid; place-items:center; cursor:pointer; transition:background .25s,color .25s}
.hdr-search button:hover{background:var(--lilac); color:var(--plum)}
.hdr-search.is-open button{background:var(--plum); color:#FFFFFF}
.hdr-search:has(input:focus-visible){outline:2px solid var(--plum); outline-offset:2px}   /* the field itself has no outline: the whole pill shows the focus, a slim plum ring (also on the drawer's search below 1280px) */

/* The signed-in member's menu: a <details>; the initials (and, on wide screens, the name) open a small card with the name, the email and Sign out */
.hdr-user{position:relative}
.hdr-acct{display:flex; align-items:center; gap:8px; padding:3px 6px 3px 3px; border-radius:999px; list-style:none; cursor:pointer; color:var(--muted); transition:background .2s}
.hdr-acct::-webkit-details-marker{display:none}
.hdr-acct:hover,.hdr-user[open] .hdr-acct{background:var(--lilac)}
.hdr-acct:focus-visible{outline:3px solid var(--deep); outline-offset:2px}
.hdr-chev{flex:none; transition:transform .2s}
.hdr-user[open] .hdr-chev{transform:rotate(180deg)}
.avatar{width:38px; height:38px; border-radius:50%; display:grid; place-items:center; flex:none; background:var(--plum); color:#FFFFFF; font:500 13.5px var(--display); text-decoration:none}
.hdr-acct:hover .avatar,.hdr-user[open] .avatar{background:var(--plum-d)}
.hdr-who{display:flex; flex-direction:column; line-height:1.2; white-space:nowrap; max-width:140px}
.hdr-acct:hover .hdr-who b{color:var(--plum)}
.hdr-who b{font:500 14.5px var(--display); color:var(--ink); overflow:hidden; text-overflow:ellipsis}
.hdr-who small{font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis}
.hdr-pop{position:absolute; right:0; top:calc(100% + 10px); z-index:60; width:260px; padding:8px; background:var(--card); border:1px solid var(--line); border-radius:16px; box-shadow:0 22px 44px -18px rgba(36,26,44,.35)}
.hdr-me{display:flex; flex-direction:column; gap:2px; margin:0 0 6px; padding:8px 12px 12px; border-bottom:1px solid var(--line); font-size:13px; line-height:1.35; color:var(--muted); overflow-wrap:anywhere}
.hdr-me b{font:500 15px var(--display); color:var(--ink)}
.hdr-pop .inline-form{margin:0}
.hdr-out{display:flex; align-items:center; gap:10px; width:100%; min-height:42px; padding:0 12px; border:0; border-radius:10px; background:none; color:var(--ink); font:600 14.5px/1 'Noto Sans',system-ui,sans-serif; text-align:left; cursor:pointer; white-space:nowrap}
.hdr-out svg{color:var(--plum)}
.hdr-out:hover{background:var(--lilac); color:var(--plum-d)}
.hdr-burger{display:none; margin-left:auto; width:46px; height:46px; border:1.5px solid var(--edge); border-radius:14px; background:var(--card); cursor:pointer; flex-direction:column; justify-content:center; align-items:center; gap:5px; transition:background .3s,border-color .3s}
.hdr-burger span{display:block; width:20px; height:2px; border-radius:2px; background:var(--ink); transition:transform .3s var(--ease),opacity .2s,background .3s}
.hdr.is-open .hdr-burger span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hdr.is-open .hdr-burger span:nth-child(2){opacity:0}
.hdr.is-open .hdr-burger span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* Tight desktop widths: a little less space around the links, a narrower open search box, and the signed-in member's name waits (the avatar stays).
   While the search box is open the tagline steps aside, so a wide logo, four links, the box and the account block never collide. */
@media (max-width:1430px){ .hdr-nav a{padding:12px 10px} .hdr-nav a::after{left:10px; right:10px} .hdr-tag{max-width:205px; margin-left:16px; padding-left:16px; font-size:13px} }   /* a laptop: the menu needs the room, so the links sit closer and the line beside the logo is a little smaller. Below this width the tagline used to run into the first menu item. */
@media (min-width:1280px) and (max-width:1480px){ .hdr-search.is-open input{width:130px} }
@media (min-width:1280px){ .hdr-in:has(.hdr-search.is-open) .hdr-tag{display:none} }
@media (min-width:1280px) and (max-width:1319px){ .hdr-tag{display:none} }   /* the narrowest window that still shows the whole menu: the logo, the menu, the search and the buttons need every pixel, so the line beside the logo waits until there is room for it */
@media (max-width:1600px){ .hdr-who{display:none} }
.hdr-drawer-top,.hdr-scrim{display:none}
html.nav-lock{overflow:hidden}

/* Below 1280px the menu is a drawer that slides in from the right, over a dimmed page */
@keyframes drawerIn{from{opacity:0; transform:translateX(26px)}}
@media (max-width:1279px){
  :root{--hdr-h:72px}
  .hdr-brand img{height:46px}
  .hdr-brand .hdr-emblem{width:38px; height:38px}
  .hdr-word{font-size:22px}
  .hdr-tag{font-size:12.5px; max-width:190px}
  .hdr-tag::before{height:34px}
  .hdr-burger{display:flex}

  .hdr-scrim{display:block; position:fixed; inset:0; z-index:1; background:rgba(52,24,63,.6); opacity:0; visibility:hidden; transition:opacity .35s,visibility 0s .35s}
  .hdr.is-open .hdr-scrim{opacity:1; visibility:visible; transition:opacity .35s,visibility 0s}

  .hdr-collapse{
    position:fixed; top:0; right:0; bottom:0; z-index:2; width:min(88vw,400px); flex:none; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:14px;
    padding:18px 22px max(24px,env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior:contain; background:var(--card); border-radius:var(--r) 0 0 var(--r);
    box-shadow:-30px 0 60px -30px rgba(52,24,63,.6); transform:translateX(105%); visibility:hidden; transition:transform .45s var(--ease),visibility 0s .45s;
  }
  .hdr.is-open .hdr-collapse{transform:none; visibility:visible; transition:transform .45s var(--ease),visibility 0s}

  .hdr-drawer-top{display:flex; align-items:center; justify-content:space-between; padding:2px 0 4px}
  .hdr-drawer-t{font:300 24px var(--display); letter-spacing:-.03em; color:var(--deep)}
  .hdr-close{width:44px; height:44px; border:0; border-radius:50%; background:var(--lilac); color:var(--plum); display:grid; place-items:center; cursor:pointer; transition:background .2s,color .2s,transform .35s var(--ease)}
  .hdr-close:hover{background:var(--plum); color:#FFFFFF; transform:rotate(90deg)}

  .hdr-tools{display:contents}   /* the search and the account block become items of the drawer, below the links, in the same order as the markup (so Tab follows what the eye sees) */
  .hdr-search{margin-top:10px; background:var(--lilac); border-radius:999px}
  .hdr-search input{width:100%; flex:1; height:48px; padding:0 6px 0 20px; opacity:1; visibility:inherit; transition:none; font-size:16px}   /* 16px keeps iOS from zooming in; inherit so it is unreachable while the drawer is closed */
  .hdr-search button{width:40px; height:40px; margin:4px; border-radius:50%; background:var(--plum); color:#FFFFFF}
  .hdr-search button:hover{background:var(--plum-d); color:#FFFFFF}

  .hdr-nav{flex-direction:column; gap:0; margin:0}
  .hdr-nav a{padding:16px 6px 16px 16px; font:400 20px/1.2 var(--display); letter-spacing:-.02em; border-bottom:1px solid var(--line)}
  .hdr-nav a::after{left:0; right:auto; top:50%; bottom:auto; width:4px; height:26px; margin-top:-13px; transform:scaleY(.4)}
  .hdr-nav a:hover::after,.hdr-nav a.is-active::after{transform:scaleY(1)}

  .hdr-user{padding:14px; border-radius:var(--r-m); background:var(--lilac)}   /* in the drawer: the initials, name and organization in a row; a tap shows Sign out under them */
  .hdr-acct{gap:12px; padding:0; background:none}
  .hdr-acct:hover,.hdr-user[open] .hdr-acct{background:none}
  .hdr-who{display:flex; flex:1; min-width:0; max-width:none}
  .hdr-pop{position:static; width:auto; margin-top:12px; padding:0; border:0; border-radius:0; background:none; box-shadow:none}
  .hdr-me{display:none}   /* the name is already in the row above */
  .hdr-out{justify-content:center; min-height:48px; border:1.5px solid var(--edge); border-radius:999px; background:var(--card); font-size:15px}

  .hdr-auth{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:6px 0 0}   /* in the drawer: two equal buttons side by side, under the search */
  .hdr-auth > :only-child{grid-column:1 / -1}
  .hdr-signin,.hdr-auth .hdr-signup{min-height:48px; font-size:16px}
  .hdr-signin{border:1.5px solid var(--edge); background:var(--card)}

  .hdr.is-open .hdr-search,.hdr.is-open .hdr-nav a,.hdr.is-open .hdr-user,.hdr.is-open .hdr-auth{animation:drawerIn .5s var(--ease) both}
  .hdr.is-open .hdr-nav a:nth-child(1){animation-delay:.12s} .hdr.is-open .hdr-nav a:nth-child(2){animation-delay:.17s}
  .hdr.is-open .hdr-nav a:nth-child(3){animation-delay:.22s} .hdr.is-open .hdr-nav a:nth-child(4){animation-delay:.27s}
  .hdr.is-open .hdr-search{animation-delay:.32s}
  .hdr.is-open .hdr-user,.hdr.is-open .hdr-auth{animation-delay:.38s}
}
@media (max-width:700px){ .hdr-tag{display:none} }   /* phones: the logo alone, so nothing overflows */
@media (max-width:360px){ .hdr-word{font-size:20px} .hdr-brand{gap:9px} .hdr-brand img{height:40px; max-width:170px} .hdr-brand .hdr-emblem{width:32px; height:32px} }

/* JavaScript off (the "js" class is set by boot.js): no drawer to open, so the links simply sit under the logo */
@media (max-width:1279px){
  html:not(.js) .hdr-in{height:auto; flex-wrap:wrap; padding-top:10px; padding-bottom:10px}
  html:not(.js) .hdr-burger,html:not(.js) .hdr-scrim,html:not(.js) .hdr-drawer-top{display:none}
  html:not(.js) .hdr-collapse{position:static; width:100%; flex:1 1 100%; flex-direction:row; flex-wrap:wrap; align-items:center; padding:0; border-radius:0; box-shadow:none; background:transparent; transform:none; visibility:visible; overflow:visible}
  html:not(.js) .hdr-nav{flex-direction:row; flex-wrap:wrap; margin:0}
  html:not(.js) .hdr-nav a{font:600 15px/1.2 'Noto Sans',system-ui,sans-serif; letter-spacing:0; padding:10px 12px; border:0}
  html:not(.js) .hdr-tools{display:flex}
  html:not(.js) .hdr-search{background:var(--lilac)}
  html:not(.js) .hdr-search input{width:170px; padding:0 6px 0 16px; opacity:1; visibility:visible}
}

/* ---- Breadcrumbs, content grid ------------------------------------------- */   /* (the page banner, which uses the breadcrumbs, is in banner.css) */
.crumbs-row{display:flex; flex-wrap:wrap; gap:4px 10px; align-items:center; font-size:14px}
.crumbs-row a{display:inline-flex; align-items:center; min-height:24px; color:var(--muted); text-decoration:none} .crumbs-row a:hover{color:var(--plum); text-decoration:underline}   /* min-height: a 24px target (WCAG 2.5.8) */
.crumbs-row .sep{color:#8B7F96}
.crumbs-row .here{color:var(--ink); font-weight:600}
.sec-in{max-width:var(--maxw); margin:0 auto; padding:clamp(28px,4vw,52px) var(--gutter) clamp(48px,7vw,104px)}
.cols{display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:clamp(28px,4vw,48px); align-items:start}
.cols-filter{grid-template-columns:290px minmax(0,1fr)}
.note-card{background:var(--card); border:1px solid var(--line); border-radius:var(--r-m); padding:22px 26px; display:flex; flex-direction:column; gap:8px}
.note-card h2,.note-card h3{font:400 var(--fs-h3)/1.3 var(--display); letter-spacing:-.02em; color:var(--deep)}
.note-card p{margin:0; font-size:var(--fs-body); line-height:1.6; color:var(--muted)}
.sbar{display:flex; align-items:center; gap:8px; width:100%; max-width:720px; padding:6px; background:#FFFFFF; border:1.5px solid var(--edge); border-radius:999px; box-shadow:var(--shadow-s)}
.sbar input{flex:1; min-width:0; height:46px; min-height:0; border:0; outline:0; border-radius:0; box-shadow:none; padding:0 18px; font:500 16.5px 'Noto Sans',system-ui,sans-serif; background:transparent; color:var(--ink)}
.sbar:focus-within{border-color:var(--plum); box-shadow:var(--shadow-s),0 0 0 3px var(--bg),0 0 0 6px var(--deep)}   /* a gap, then the ring */


/* ---- Library ------------------------------------------------------------- */
.filters{position:sticky; top:calc(var(--hdr-h) + 18px); padding:0; max-height:calc(100vh - var(--hdr-h) - 36px); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin}   /* taller than the screen? it scrolls inside, so Apply stays reachable */
.filters-h{display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:20px 22px 14px}
.filters-h h2{font:400 var(--fs-h3) var(--display); letter-spacing:-.02em}
.filters-h a{display:inline-flex; align-items:center; min-height:24px; font-size:13px; font-weight:600}
.fgroup{margin:0; border:0; padding:16px 22px 20px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:12px}
.fgroup legend{padding:0 0 10px; font:700 12px 'Noto Sans',system-ui,sans-serif; letter-spacing:.1em; text-transform:uppercase; color:var(--muted)}
.fgroup .chk span{color:var(--muted)}
.filters .btn{margin:0 22px 22px; width:calc(100% - 44px)}
.filters-n{display:inline-grid; place-items:center; min-width:22px; height:22px; padding:0 6px; border-radius:999px; background:var(--plum); color:#FFFFFF; font:600 12px/1 'Noto Sans',system-ui,sans-serif; vertical-align:2px}
.filters-toggle{display:none}
.sortby{display:flex; align-items:center; gap:10px; font-size:14.5px; font-weight:600}
.sortby .inp{width:auto; min-height:42px; font-size:15px}
.rc{display:grid; grid-template-rows:1fr auto; gap:18px; padding:24px; background:var(--card); border:1px solid var(--line); border-radius:var(--r-m); transition:transform .35s var(--ease),border-color .25s,box-shadow .35s}
.rc:hover{transform:translateY(-3px); border-color:var(--line-s); box-shadow:var(--shadow-s)}
.rc-main{display:flex; flex-direction:column; gap:10px; min-width:0}
.rc-tags{display:flex; gap:8px; flex-wrap:wrap; align-items:center}
.rc h3{font:400 var(--fs-h3)/1.25 var(--display); letter-spacing:-.02em}
.rc h3 a{color:inherit; text-decoration:none} .rc h3 a:hover{color:var(--plum)}
.rc-sum{margin:0; font-size:var(--fs-body); line-height:1.55; color:var(--muted); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden}
.rc-act{display:flex; flex-wrap:wrap; gap:10px}
.rc-act .btn{white-space:nowrap}
/* list / grid switch above the results */
.results-tools{display:flex; align-items:center; gap:12px 20px; flex-wrap:wrap}
.viewtoggle{display:inline-flex; gap:2px; padding:4px; border:1.5px solid var(--line-s); border-radius:999px; background:var(--card)}
.viewtoggle a{display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 14px; border-radius:999px; font:600 14px/1 'Noto Sans',system-ui,sans-serif; color:var(--muted); text-decoration:none; transition:background .2s,color .2s}
.viewtoggle a:hover{color:var(--plum)}
.viewtoggle a.is-on{background:var(--plum); color:#FFFFFF}
/* grid view: the same resources as text cards, two or three across */
.rc-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(min(290px,100%),1fr)); gap:20px; align-items:stretch}
.rc-grid.lib-phone{display:none}   /* the phone copy of the list (library.php): shown instead of the table on phones */
@media (max-width:700px){
  .rc-grid.lib-phone{display:grid}
  .viewtoggle{display:none}   /* phones: cards only, no List / Grid switch */
}
@media (max-width:480px){
  .viewtoggle span{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}   /* icons only, the names stay for screen readers */
  .viewtoggle a{padding:0 11px}
}

/* ---- Site search results (the navbar search) ---------------------------------- */
mark{background:#EADBF0; color:inherit; padding:0; border-radius:3px}   /* no side padding: a word highlighted in part must not look as if it were split */
.sr-wrap{max-width:900px; margin-left:auto; margin-right:auto; display:flex; flex-direction:column; gap:34px}
.sr-count{margin:0; font-size:var(--fs-small); color:var(--muted)} .sr-count b{color:var(--ink)}
.sr-partial{margin:-20px 0 0; font-size:var(--fs-small); color:#675E71}
.sr-group{display:flex; flex-direction:column; gap:14px}
.sr-group h2{display:flex; align-items:center; gap:10px; font:300 var(--fs-h2) var(--display); letter-spacing:-.03em; color:var(--deep)}
.sr-group h2 span{display:inline-grid; place-items:center; min-width:26px; height:26px; padding:0 8px; border-radius:999px; background:var(--lilac); color:var(--deep); font:600 13px/1 'Noto Sans',system-ui,sans-serif}
.sr-list{list-style:none; margin:0; padding:0; display:grid; gap:12px}
.sr-item{padding:18px 24px; background:var(--card); border:1px solid var(--line); border-radius:var(--r-m); transition:border-color .25s,box-shadow .35s}
.sr-item:hover{border-color:var(--line-s); box-shadow:var(--shadow-s)}
.sr-top{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:8px}
.sr-top:empty{display:none}
.sr-item h3{font:400 var(--fs-h3)/1.3 var(--display); letter-spacing:-.02em}
.sr-item h3 a{color:var(--ink); text-decoration:none} .sr-item h3 a:hover{color:var(--plum)}
.sr-text{margin:6px 0 0; font-size:var(--fs-body); line-height:1.6; color:var(--muted)}
.sr-meta{margin:8px 0 0; font-size:var(--fs-small); color:#675E71}
.sr-chips{display:flex; flex-wrap:wrap; gap:10px}
.sr-chip{display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:9px 18px; border-radius:999px; background:var(--lilac); color:var(--deep); font:600 14.5px/1 'Noto Sans',system-ui,sans-serif; text-decoration:none; transition:background .2s,color .2s}
.sr-chip span{font-weight:500; opacity:.8}
.sr-chip:hover{background:var(--plum); color:#FFFFFF}
.sr-more{align-self:flex-start; display:inline-flex; align-items:center; gap:6px; font-size:15px; font-weight:600}

/* ---- Search suggestions: the dropdown under a search box while the visitor types (js/suggest.js) ------------- */
.sg{position:fixed; z-index:300; display:flex; flex-direction:column; padding:8px; overflow:auto; overscroll-behavior:contain; background:var(--card); border:1px solid var(--line-s); border-radius:var(--r-m); box-shadow:var(--shadow); text-align:left}
.sg[hidden]{display:none}
.sg-h{padding:10px 12px 4px; font:700 11.5px/1 'Noto Sans',system-ui,sans-serif; letter-spacing:.1em; text-transform:uppercase; color:#675E71}
.sg-o{display:flex; flex-direction:column; gap:2px; padding:9px 12px; border-radius:12px; color:var(--ink); text-decoration:none}
.sg-o.is-on{background:var(--lilac)}
.sg-t{font:400 15.5px/1.3 var(--display)}
.sg-t mark{background:#EADBF0; color:inherit; padding:0 1px; border-radius:3px}
.sg-m{font-size:12.5px; line-height:1.35; color:var(--muted)}
.sg-none{padding:12px; font-size:14px; color:var(--muted)}
.sg-all{margin-top:6px; padding:12px; border-top:1px solid var(--line); border-radius:12px; font:600 14px/1.3 'Noto Sans',system-ui,sans-serif; color:var(--plum); overflow-wrap:anywhere}
.sg-all.is-on{background:var(--lilac)}

/* ---- Auth pages (sign in, register helpers, password reset) ------------------ */
.auth{position:relative; overflow:hidden; padding:clamp(36px,6vw,80px) 24px clamp(48px,7vw,96px); background:var(--bg)}
.auth-in{max-width:520px; margin:0 auto; display:flex; flex-direction:column; gap:22px}
.auth-card{padding:30px 32px; display:flex; flex-direction:column; gap:20px}
.cm-hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}

/* ---- Sign in / Sign up window (a modal dialog, opened by auth.js on any public page) ------------------------ */
html.am-lock,html.am-lock body{overflow:hidden; overscroll-behavior:none}   /* the page behind the window must not scroll (body too: some phone browsers scroll it, not html) */
.am{width:min(460px,calc(100vw - 24px)); max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); padding:0; border:0; border-radius:var(--r); background:var(--card); color:var(--ink); box-shadow:0 44px 90px -34px rgba(52,24,63,.7); overflow:auto; overscroll-behavior:contain}
.am-wide{width:min(680px,calc(100vw - 24px))}   /* the sign-up form has two columns */
.am::backdrop{background:rgba(52,24,63,.6); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px)}
.am[open]{animation:amIn .3s var(--ease)}
.am[open]::backdrop{animation:amFade .3s ease}
@keyframes amIn{from{opacity:0; transform:translateY(16px) scale(.985)}}
@keyframes amUp{from{opacity:.4; transform:translateY(40px)}}
@keyframes amFade{from{opacity:0}}
.am-x{position:sticky; top:12px; z-index:3; display:grid; place-items:center; width:40px; height:40px; margin:12px 12px -52px auto; border:0; border-radius:50%; background:var(--lilac); color:var(--plum); cursor:pointer; transition:background .2s,color .2s}
.am-x:hover{background:var(--plum); color:#FFFFFF}
.am-body{display:flex; flex-direction:column; gap:18px; padding:36px 34px 30px}
.am-head{margin:0 48px 2px 0}
.am-head h2{font:300 var(--fs-h3)/1.1 var(--display); letter-spacing:-.03em; color:var(--deep)}   /* the window is a card 460px wide: its title is a card title, not a section heading */
.am-head p{margin:10px 0 0; font-size:var(--fs-body); line-height:1.5; color:var(--muted)}
.am-loading{margin:0; padding:36px 0; text-align:center; color:var(--muted)}
.am .auth-card{padding:0; border:0; box-shadow:none; background:none; gap:16px}
.am .lede{margin:0 0 4px}
.am-thanks{display:flex; flex-direction:column; align-items:flex-start; gap:14px}
.am-thanks p{margin:0; font-size:var(--fs-body); line-height:1.6}
@media (max-width:520px){   /* a phone: the window is a sheet from the bottom */
  .am,.am-wide{width:100vw; max-width:100vw; max-height:92vh; max-height:92dvh; margin:auto 0 0; border-radius:var(--r) var(--r) 0 0}
  .am-body{padding:28px 20px 24px}
  .am[open]{animation-name:amUp}
}
@media (prefers-reduced-motion:reduce){
  .am[open],.am[open]::backdrop{animation:none}
  .am-x{transition:none}
}


/* ---- Responsive ---------------------------------------------------------- */
@media (max-width:960px){
  .cols,.cols-filter{grid-template-columns:1fr}
  .filters{position:static; max-height:none; overflow:visible}
  .js .filters-h{align-items:center; padding-bottom:18px}
  .js .filters-toggle{display:grid; place-items:center; width:44px; height:44px; border:0; border-radius:50%; background:var(--lilac); color:var(--plum); cursor:pointer; transition:transform .3s var(--ease),background .2s,color .2s}
  .js .filters.is-open .filters-toggle{transform:rotate(180deg); background:var(--plum); color:#FFFFFF}
  .js .filters-body{display:none}
  .js .filters.is-open .filters-body{display:block}
}
@media (max-width:600px){
  .auth-card{padding:24px 20px}
}
@media (prefers-reduced-motion:reduce){
  .rc,.hdr,.hdr-burger span,.hdr-nav a::after,.hdr-collapse,.hdr-scrim,.hdr-close,.hdr-search,.hdr-search input{transition:none}   /* the search field opens at once (it slid open in 0.35 s) */
  .rc:hover{transform:none}
  .hdr.is-open .hdr-search,.hdr.is-open .hdr-nav a,.hdr.is-open .hdr-user,.hdr.is-open .hdr-auth{animation:none}
}

/* ---- Floating buttons, as on the earlier version of the site: "Connect With Us" (leaf green) and "Suggest a Resource" (yellow), tabs with rounded left corners and small capitals, dark text, at the right edge ---- */
.side-ctas{position:fixed; right:0; top:50%; z-index:55; transform:translateY(-50%); display:flex; flex-direction:column; align-items:flex-end; gap:10px}
.side-cta{
  display:flex; flex-direction:column; align-items:center; gap:12px; padding:18px 11px 20px; border-radius:16px 0 0 16px;
  text-decoration:none; font:700 13px/1 'Noto Sans',system-ui,sans-serif; letter-spacing:.1em; text-transform:uppercase;
  box-shadow:-10px 14px 30px -14px rgba(52,24,63,.5); transition:padding .25s var(--ease),background .2s;
}
.side-cta svg{flex:none}
.side-cta-t{writing-mode:vertical-rl; transform:rotate(180deg); white-space:nowrap}
.side-cta-ask{background:var(--leaf); color:#13210A}
.side-cta-req{background:#F8C93E; color:#2B1D00}
.side-cta-ask:hover,.side-cta-ask:focus-visible{background:#82B842; color:#13210A}
.side-cta-req:hover,.side-cta-req:focus-visible{background:#EDB726; color:#2B1D00}
.side-cta:hover,.side-cta:focus-visible{padding-right:17px}
.side-cta:focus-visible{outline:3px solid var(--deep); outline-offset:-3px}
@media (max-width:1100px){   /* tablet: the two buttons side by side at the bottom right instead of edge tabs */
  .side-ctas{top:auto; bottom:18px; right:16px; transform:none; flex-direction:row; align-items:center}
  .side-cta{flex-direction:row; gap:10px; padding:14px 20px; border-radius:999px; box-shadow:0 14px 30px -12px rgba(52,24,63,.5)}
  .side-cta-t{writing-mode:horizontal-tb; transform:none; letter-spacing:.06em; font-size:13px}
  .side-cta:hover,.side-cta:focus-visible{padding:14px 20px}
  .page > .site-foot{padding-bottom:88px}   /* room under the footer, so the buttons never cover its last line */
  html{scroll-padding-bottom:96px}   /* a link or field reached with Tab scrolls up clear of the buttons (WCAG 2.4.11) */
}
@media (max-width:600px){   /* phone: one slim bar along the bottom with the two buttons, so the page keeps the full width above it */
  .side-ctas{left:0; right:0; bottom:0; align-items:stretch; padding:8px 10px max(8px,env(safe-area-inset-bottom)); gap:8px; background:var(--card); border-top:1px solid var(--line); box-shadow:0 -12px 26px -20px rgba(52,24,63,.5)}
  .side-cta{flex:1 1 0; min-width:0; justify-content:center; text-align:center; padding:12px 8px; border-radius:999px; box-shadow:none; font-size:13.5px; line-height:1.2; text-transform:none}   /* mixed case here: two capital-letter labels would not fit side by side */
  .side-cta-t{white-space:normal; letter-spacing:.01em; font-size:13.5px}
  .side-cta svg{display:none}   /* no room for icons on the narrowest phones */
  .side-cta:hover,.side-cta:focus-visible{padding:12px 8px}
  .page > .site-foot{padding-bottom:76px}
}
@media (max-height:520px) and (max-width:1100px){   /* a short window (a phone on its side, or a page zoomed to 400 %): the navbar and the two buttons scroll away with the page, so they never hide what has the focus (WCAG 1.4.10, 2.4.11) */
  .hdr{position:relative}
  .side-ctas{position:static; justify-content:center; flex-wrap:wrap; padding:12px 10px}
  .page > .site-foot{padding-bottom:0}
  html{scroll-padding-top:0; scroll-padding-bottom:0}
}
@media print{
  html{-webkit-print-color-adjust:exact; print-color-adjust:exact}   /* the dark bands, plum buttons and badges keep their colour: browsers leave backgrounds out by default, and white text on a dark band would print as white on white */
  .side-ctas,.hdr-burger,.hdr-scrim{display:none}
  .hdr{position:static}
}
@media (prefers-reduced-motion:reduce){ .side-cta{transition:none} }

/* ---- "Need Help?" button: a small tap-to-call pill at the bottom left of every page (Site settings > Footer > Floating help button).
   The client's request of 25 November 2026: easily reached, but not prominent or intrusive. ------------------------------------- */
.help-fab{
  position:fixed; left:16px; bottom:16px; z-index:54; display:flex; align-items:center; gap:8px; padding:10px 16px 10px 12px; border-radius:999px;
  background:var(--card); color:var(--deep); text-decoration:none; font:600 13.5px/1.2 'Noto Sans',system-ui,sans-serif;
  box-shadow:0 14px 30px -14px rgba(52,24,63,.5); border:1px solid var(--line); transition:box-shadow .2s,transform .2s;
}
.help-fab svg{flex:none; color:var(--plum)}
.help-fab-t b{font-weight:700}
.help-fab:hover,.help-fab:focus-visible{box-shadow:0 18px 36px -14px rgba(52,24,63,.6); transform:translateY(-1px)}
.help-fab:focus-visible{outline:3px solid var(--deep); outline-offset:2px}
@media (max-width:600px){
  .help-fab{left:10px; bottom:84px; padding:9px 14px 9px 10px; font-size:12.5px}   /* lifted clear of the Connect/Suggest bar, which spans the full width here */
}
@media print{ .help-fab{display:none} }

/* ---- Footer: a plain grey panel (the contour-line pattern of the earlier design made the text hard to read, so it is gone) -------------
   From the top: the brand row (the site name and its line, "A Program of" and the Care for Newcomers logo); Contact, the links to other sites (the community-partner call under
   them) and Quick links; the funding box, the Land Acknowledgment and the line with the policy links. The panel is the ::before (the grey and a soft glow at the
   top): it also fills the room the floating buttons need under the last line (.page > .site-foot padding, above). A gap of page colour
   above it, with the panel's rounded top corners, ends the last section of every page cleanly. ft-compact (sign-in pages): only the links and the funding line. */
.site-foot{
  --ft-gap:clamp(24px,3.5vw,48px); --ft-r:clamp(32px,4vw,60px);
  position:relative; isolation:isolate; margin-top:var(--ft-gap); border-radius:var(--ft-r) var(--ft-r) 0 0; background:#E8E9ED; color:#2F2B37;
}
.site-foot::before{
  content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit; box-shadow:0 -1.5px 0 rgba(105,58,120,.32);   /* the plum hairline that follows the curve */
  background:radial-gradient(70% 90% at 50% 0,#F9F9FB,#E8E9ED 70%);
}
.ft-in{max-width:var(--maxw); margin:0 auto; padding:clamp(44px,6vw,84px) var(--gutter) clamp(24px,2.4vw,32px)}

/* the brand row at the top (the full footer only), straight on the grey panel, no card around it: the name and its line at the left, a thin line, then
   "A Program of" over the full Care for Newcomers logo (care-logo.png, a link to carefornewcomers.ca); on a phone the two stack, without the line */
.site-foot:not(.ft-compact) .ft-in{padding-top:clamp(32px,4vw,56px)}
.ft-brand{display:flex; flex-wrap:wrap; align-items:center; gap:18px clamp(20px,2.6vw,40px); padding:clamp(10px,1.4vw,18px) 0}
.ft-id{display:flex; flex-direction:column; align-items:flex-start; gap:8px; min-width:0; padding-left:clamp(20px,2.6vw,40px); border-left:1px solid rgba(42,23,51,.14)}
.ft-name{margin:0; display:flex; flex-wrap:wrap; gap:0 .26em; font:600 clamp(30px,3.3vw,48px)/1.05 var(--display); letter-spacing:-.03em; color:var(--ink)}
.ft-name-2{font-weight:300; color:var(--plum)}
.ft-tag{margin:0; max-width:46ch; font:italic 400 clamp(16px,1.3vw,18px)/1.5 Georgia,'Times New Roman',serif; color:#4A4656; text-wrap:balance}
.ft-prog{display:flex; flex-direction:column; align-items:flex-start; gap:10px; margin:0; color:var(--ink); text-decoration:none}
.ft-prog-l{font:700 12.5px/1.2 'Noto Sans',system-ui,sans-serif; letter-spacing:.11em; text-transform:uppercase; color:#4A4656}
.ft-prog img{display:block; width:clamp(170px,15vw,230px); height:auto; transition:transform .3s var(--ease)}
a.ft-prog:hover img{transform:translateY(-2px)}
a.ft-prog:focus-visible{outline:3px solid var(--deep); outline-offset:6px; border-radius:8px}
@media (prefers-reduced-motion:reduce){ .ft-prog img{transition:none} a.ft-prog:hover img{transform:none} }

/* Contact, the other sites (no heading: the first link sits level with the first line of the address) and Quick links */
.ft-cols{display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.8fr) minmax(0,1.35fr); gap:36px clamp(28px,3.4vw,56px); align-items:start; margin-top:clamp(36px,4vw,52px)}
.ft-h{margin:0 0 14px; font:500 var(--fs-h3)/1.1 var(--display); letter-spacing:-.01em; color:var(--ink)}
.ft-addr{font-style:normal; font-size:15px; line-height:1.75; overflow-wrap:anywhere}
.ft-org{font-weight:700; color:var(--ink)}   /* the organization stands out; the phone and email read like the address, underlined so they still show as links */
.ft-addr a{color:var(--ink); font-weight:400; text-decoration:underline; text-decoration-color:rgba(105,58,120,.5); text-underline-offset:3px}
.ft-addr a:hover{color:var(--plum); text-decoration-color:currentColor}
.ft-ext{padding-top:40px}
.ft-list,.ft-inline ul,.ft-legal ul{list-style:none; margin:0; padding:0}
.ft-list{display:flex; flex-direction:column; gap:5px}
.ft-list a,.ft-inline a{display:inline-flex; align-items:center; gap:7px; padding:3px 0; color:var(--ink); font-size:15px; font-weight:600; line-height:1.5; text-decoration:none}
.ft-list a:hover,.ft-inline a:hover{text-decoration:underline; text-underline-offset:3px}
.ft-list svg,.ft-inline svg{flex:none; color:var(--plum)}
.ft-quick{justify-self:end; width:100%; max-width:480px}   /* pushed to the right edge, level with the box of policy links below */
.ft-quick-cols{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 28px}
.ft-help{margin-top:24px}
.ft-q{margin:0 0 4px; font:700 13px/1.35 'Noto Sans',system-ui,sans-serif; letter-spacing:.1em; text-transform:uppercase; color:var(--plum-d)}
.ft-suggest{display:inline-flex; align-items:flex-start; gap:8px; padding:2px 0; font-size:15px; font-weight:600; line-height:1.45; color:var(--plum)}
.ft-suggest svg{flex:none; margin-top:3px}
.ft-suggest span{text-wrap:balance}
.ft-suggest:hover{color:var(--plum-d)}
.ft-inline ul{display:flex; flex-wrap:wrap; justify-content:center; gap:4px 28px}

/* the bottom row: the funding box (left) and the box with the policy links (right), two white boxes stretched to the same height so the row ends evenly */
.ft-bottom{display:flex; flex-direction:column; align-items:center; gap:14px; margin-top:clamp(32px,3.4vw,48px)}   /* the funding box centred, the policy-links line centred below it */
.ft-fund{display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; padding:10px 20px; border-radius:14px; background:#FFFFFF}
.ft-fund p{margin:0; font-size:14px; line-height:1.45; color:#46424F}
.ft-fund img{display:block; height:clamp(64px,6.4vw,92px); width:auto; max-width:100%; object-fit:contain}
.ft-fund-logo{padding:12px 24px}   /* the uploaded funding logo alone (it carries its own funding line), large enough to read its small print */
.ft-land{max-width:92ch; margin:0; font-size:14px; line-height:1.6; text-align:center; text-wrap:pretty; color:#46424F}   /* the Land Acknowledgment (Site settings > Footer), centred under the funding box */
.ft-land b{font-weight:700; color:var(--ink)}
.ft-legal{display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:8px 20px; width:100%; padding:14px 0 0; border-top:1px solid rgba(42,23,51,.1); color:var(--ink)}   /* one full-width line straight on the grey panel: the copyright at the left, the policy links in the middle, the credit at the right */
.ft-legal .ft-copy{order:1; justify-self:start}
.ft-legal ul{order:2; justify-self:center}
.ft-legal .ft-credit{order:3; justify-self:end}
.ft-legal ul{display:flex; flex-wrap:wrap; justify-content:center; gap:0 20px}
.ft-legal a{display:inline-block; padding:4px 0; color:var(--ink); font-size:14px; font-weight:600; text-decoration:none}
.ft-legal a:hover{text-decoration:underline; text-underline-offset:3px}
.ft-copy{margin:0; font-size:14px; color:var(--muted)}
.ft-legal .ft-credit a{display:inline; padding:0; font-size:inherit; text-decoration:underline; text-underline-offset:3px}   /* the designer credit: quiet, the name a link */
.ft-compact .ft-in{padding-top:clamp(32px,4vw,48px)}
.ft-compact .ft-bottom{margin-top:clamp(24px,3vw,32px)}
@media (max-width:1239px){   /* tablet: Contact beside the other sites, Quick links in a row of their own (its two columns level with the two above), the boxes at the left */
  .ft-cols{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ft-quick{grid-column:1 / -1; justify-self:stretch; max-width:none}
  .ft-quick-cols{column-gap:clamp(28px,3.4vw,56px)}
}
@media (max-width:640px){   /* phone: one column; the legal line stacks centred under the funding box */
  .ft-cols{grid-template-columns:minmax(0,1fr)}
  .ft-ext{padding-top:0}
  .ft-addr,.ft-list a,.ft-inline a,.ft-suggest{font-size:16px}
  .ft-bottom{flex-direction:column; align-items:stretch}
  .ft-legal{grid-template-columns:minmax(0,1fr); text-align:center}
  .ft-legal ul,.ft-legal .ft-copy,.ft-legal .ft-credit{justify-self:center}
}
@media (max-width:560px){ .ft-id{padding-left:0; border-left:0} }   /* phone: the logo, then the name under it, with no line between */
@media (max-width:480px){ .ft-quick-cols{grid-template-columns:minmax(0,1fr)} }
/* Phones: the small print of the footer, and hints, one step larger. The headings and the reading text need nothing here: their sizes
   come from the scale, which already holds on a phone. */
@media (max-width:600px){
  .hint,.rc-meta{font-size:14.5px}
  .ft-fund p,.ft-copy,.ft-legal a,.ft-land{font-size:14.5px}
}
