/* ==========================================================================
   Ellii Help Docs — custom CSS

   Design language pulled from two places:
     • ellii.com marketing — periwinkle hero field (#e9edff, the same colour as
       the hero SVG), Open Sans 700 at -0.04em, #5774fc pill CTAs
     • ellii.com/terms — the Legal pages' prose, TOC sidebar and card shapes
   Palette tokens are the real values from next/styles/globalStyle.css,
   converted from oklch to hex.

   Install: Help Scout → Docs → Settings → Custom code → "Custom stylesheet
   URL" (or Upload stylesheet, which fills that same field). It is a single
   slot, so this file REPLACES whatever URL is there now.
   The @import must stay on the very first line.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

:root {
  --e-black: #231f20;
  --e-white: #ffffff;

  --e-gray-50: #f8f8f8;
  --e-gray-100: #f5f5f5;
  --e-gray-150: #f2f2f2;
  --e-gray-200: #ebebeb;
  --e-gray-300: #dbdbdb;
  --e-gray-400: #cacaca;
  --e-gray-500: #ababab;
  --e-gray-600: #959595;
  --e-gray-700: #7a7a7a;
  --e-gray-800: #606060;
  --e-gray-900: #484848;

  --e-blue-50: #f3f5fc;
  --e-blue-100: #eaeefc;
  --e-blue-500: #5774fc;
  --e-blue-700: #4360ea;

  --e-yellow-200: #fff6c8;
  --e-yellow-500: #fdd406;
  --e-yellow-600: #fcb600;
  --e-yellow-700: #f69900;

  /* Hero gradient — the ellii.com/packs page background
     (bg-gradient-purple-100 in next/styles/gradients.css) */
  --e-grad-1: #faefff;
  --e-grad-2: #f4f4ff;
  --e-grad-3: #edf1ff;

  /* Periwinkle — from the ellii.com hero illustration */
  --e-peri-50: #f3f5ff;
  --e-peri-100: #e9edff;
  --e-peri-200: #d9e0ff;

  /* Jellybeans — the Ellii accent set, used to colour-code categories */
  --e-jb-lightblue: #71bfff;
  --e-jb-yellow: #fcb600;
  --e-jb-purple: #d97eff;
  --e-jb-teal: #00b5b7;
  --e-jb-orange: #fd9915;
  --e-jb-pink: #ff91ce;

  --e-shadow: 0 4px 20px rgba(173, 171, 171, 0.25);
  --e-shadow-blue: 0 8px 26px rgba(87, 116, 252, 0.16);
  --e-radius-sm: 10px;
  --e-radius: 12px;
  --e-radius-lg: 16px;
  --e-pill: 500px;
  --e-max: 1200px;
  --e-gutter: 32px;

  --e-font: 'Open Sans', BlinkMacSystemFont, -apple-system, Roboto, 'Segoe UI',
    sans-serif;
}

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */

body {
  font-family: var(--e-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--e-black);
  background: var(--e-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.brand, .btn, button, input, select, textarea {
  font-family: var(--e-font);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--e-black);
  text-shadow: none;
}

a {
  color: var(--e-blue-500);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover,
a:focus {
  color: var(--e-blue-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

::selection {
  background: var(--e-yellow-200);
  color: var(--e-black);
}

/* Bootstrap's clearfix pseudo-elements become stray flex/grid items */
#mainNav .container-fluid::before,
#mainNav .container-fluid::after,
#contentArea.container-fluid::before,
#contentArea.container-fluid::after {
  content: none;
}

#contentArea.container-fluid {
  max-width: var(--e-max);
  margin: 0 auto;
  padding: 0 var(--e-gutter);
}

/* --------------------------------------------------------------------------
   2. Header + tabs
   -------------------------------------------------------------------------- */

#mainNav.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0;
  background: var(--e-white);
  border-bottom: 1px solid var(--e-gray-200);
}

#mainNav .navbar-inner {
  background: var(--e-white);
  background-image: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  min-height: 0;
  padding: 0;
}

#mainNav .container-fluid {
  max-width: var(--e-max);
  margin: 0 auto;
  padding: 14px var(--e-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

#mainNav .brand {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  float: none;
  text-shadow: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--e-black);
}

#mainNav .brand img {
  display: block;
  height: 40px;
  width: auto;
  max-height: 40px;
}

/* launch.css absolutely positions `ul.nav`, which collapses its wrappers to
   zero height — the pills then sit bottom-aligned rather than centred against
   the logo. Put the list back in flow above the mobile breakpoint; below it,
   the hamburger still needs the original collapse behaviour. */
#mainNav .nav-collapse {
  float: none;
}

@media (min-width: 721px) {
  #mainNav .nav-collapse,
  #mainNav .nav-collapse > nav {
    display: flex;
    align-items: center;
    height: auto;
    overflow: visible;
  }

  #mainNav ul.nav {
    position: static;
  }
}

#mainNav ul.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  float: none;
}

#mainNav ul.nav > li {
  float: none;
  margin: 0;
}

/* Bootstrap drops a caret triangle into the active link — it renders as a
   notch hanging off the bottom of the pill. */
#mainNav ul.nav .caret {
  display: none;
}

#mainNav ul.nav > li > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--e-pill);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--e-gray-800);
  text-shadow: none;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

#mainNav ul.nav > li > a:hover,
#mainNav ul.nav > li > a:focus {
  background: var(--e-gray-100);
  color: var(--e-black);
  text-decoration: none;
}

/* Solid blue pill — the current page (Docs adds `.active`) */
#mainNav ul.nav > li.active > a {
  background: var(--e-blue-500);
  color: var(--e-white);
  box-shadow: var(--e-shadow);
}

#mainNav ul.nav > li.active > a:hover,
#mainNav ul.nav > li.active > a:focus {
  background: var(--e-blue-700);
  color: var(--e-white);
}

/* Outlined pill — the Contact CTA */
#mainNav ul.nav > li#contact:not(.active) > a {
  border: 1.5px solid var(--e-gray-200);
  padding: 7.5px 18.5px;
  color: var(--e-black);
}

#mainNav ul.nav > li#contact:not(.active) > a:hover {
  border-color: var(--e-black);
  background: var(--e-gray-50);
  color: var(--e-black);
}

#mainNav .btn-navbar {
  background: var(--e-gray-50);
  background-image: none;
  border: 1.5px solid var(--e-gray-200);
  border-radius: var(--e-radius);
  box-shadow: none;
  filter: none;
  margin: 0;
  padding: 9px 11px;
}

#mainNav .btn-navbar:hover {
  border-color: var(--e-gray-400);
  background: var(--e-gray-100);
}

#mainNav .btn-navbar .icon-bar {
  background: var(--e-black);
  box-shadow: none;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   3. Home hero — the ellii.com periwinkle field, rebuilt in CSS
   -------------------------------------------------------------------------- */

#docsSearch {
  position: relative;
  margin-bottom: 0;
  padding: 76px 0 68px;
  border-bottom: 1px solid rgba(87, 116, 252, 0.12);
  text-align: center;
  background-color: var(--e-grad-2);
  background-image: linear-gradient(
    180deg,
    var(--e-grad-1) 0%,
    var(--e-grad-2) 55%,
    var(--e-grad-3) 100%
  );
}

#docsSearch > * {
  position: relative;
  max-width: var(--e-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--e-gutter);
  padding-right: var(--e-gutter);
}

#docsSearch h1 {
  max-width: 840px;
  margin: 0 auto 30px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--e-black);
  text-align: center;
}

/* Eyebrow pill with the Ellii yellow dot. Change `content` to relabel it. */
#docsSearch h1::before {
  content: 'Ellii help docs';
  display: table;
  margin: 0 auto 22px;
  padding: 7px 16px 7px 30px;
  border-radius: var(--e-pill);
  background-color: rgba(255, 255, 255, 0.9);
  background-image: radial-gradient(
    circle 4px at 17px 50%,
    var(--e-yellow-500) 0 100%,
    transparent 100%
  );
  background-repeat: no-repeat;
  box-shadow: 0 1px 3px rgba(36, 31, 32, 0.07);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--e-gray-800);
  text-align: left;
}

/* --------------------------------------------------------------------------
   4. Search
   -------------------------------------------------------------------------- */

form#searchBar {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 0;
}

form#searchBar input.search-query {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 13px 18px;
  border: 1.5px solid var(--e-gray-200);
  border-radius: var(--e-radius);
  background: var(--e-white);
  box-shadow: none;
  font-size: 15px;
  line-height: 1.4;
  color: var(--e-black);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

form#searchBar input.search-query::placeholder {
  color: var(--e-gray-500);
}

form#searchBar input.search-query:focus {
  outline: none;
  border-color: var(--e-blue-500);
  box-shadow: 0 0 0 3px rgba(87, 116, 252, 0.3);
}

/* `position: static` undoes the stock theme, which floats this button on top
   of the input below 768px */
form#searchBar button {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 26px;
  border: 0;
  border-radius: var(--e-pill);
  background: var(--e-blue-500);
  color: var(--e-white);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

form#searchBar button:hover {
  background: var(--e-blue-700);
}

/* Hero search: one elevated white pill holding the field and the button */
#docsSearch form#searchBar {
  /* The theme's own `#docsSearch #searchBar` rule turns this into a block at
     mobile widths and outranks a plain `form#searchBar`; restate it here. */
  display: flex;
  align-items: stretch;
  max-width: 640px;
  margin: 0 auto;
  padding: 6px;
  border-radius: var(--e-pill);
  background: var(--e-white);
  box-shadow: var(--e-shadow-blue), 0 1px 2px rgba(36, 31, 32, 0.06);
  transition: box-shadow 0.15s ease;
}

#docsSearch form#searchBar:focus-within {
  box-shadow: 0 0 0 3px rgba(87, 116, 252, 0.28), var(--e-shadow-blue);
}

#docsSearch form#searchBar input.search-query {
  padding: 12px 8px 12px 20px;
  border: 0;
  border-radius: var(--e-pill);
  background: transparent;
  font-size: 16px;
}

#docsSearch form#searchBar input.search-query:focus {
  border-color: transparent;
  box-shadow: none;
}

#docsSearch form#searchBar button {
  padding: 0 30px;
  min-height: 46px;
  font-size: 16px;
}

/* The theme autofocuses this input on load; without a generous scroll margin
   a short window jumps past the hero to reveal it. */
#docsSearch form#searchBar input.search-query {
  scroll-margin-top: 420px;
}

/* Sidebar search: compact, icon-only button tucked inside the field */
form#searchBar.sm {
  display: block;
  max-width: none;
  margin-bottom: 20px;
}

form#searchBar.sm input.search-query {
  padding: 10px 14px 10px 38px;
  border-radius: var(--e-radius);
  font-size: 13px;
}

/* The stock theme stretches this button across the whole field
   (left: 0 AND right: 12px); pin it to a 38px column on the left. */
form#searchBar.sm button {
  position: absolute;
  left: 0;
  right: auto;
  top: 0;
  bottom: 0;
  width: 38px;
  padding: 0;
  justify-content: center;
  background: transparent;
  color: var(--e-gray-500);
  border-radius: 0;
  pointer-events: none;
}

form#searchBar.sm button:hover {
  background: transparent;
}

/* Autocomplete dropdown */
#serp-dd,
#serp-dd.sb {
  position: absolute;
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  min-width: 0;
  top: calc(100% + 8px);
  z-index: 60;
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--e-gray-200);
  border-radius: var(--e-radius-lg);
  background: var(--e-white);
  box-shadow: var(--e-shadow);
  text-align: left;
}

/* The theme also scrolls this inner list (max-height: 485px), which stacks a
   second scrollbar inside the one on #serp-dd. Let the container do it. */
#serp-dd ul.result,
#serp-dd.sb ul.result {
  margin: 0;
  padding: 0;
  max-height: none;
  overflow: visible;
  list-style: none;
}

#serp-dd ul.result li,
#serp-dd.sb ul.result li {
  margin: 0;
  list-style: none;
}

#serp-dd ul.result li.noResults,
#serp-dd.sb ul.result li.noResults {
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--e-gray-700);
}

#serp-dd ul.result li a,
#serp-dd.sb ul.result li a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--e-radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--e-black);
}

#serp-dd ul.result li a:hover,
#serp-dd.sb ul.result li a:hover {
  background: var(--e-gray-100);
  color: var(--e-black);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Category cards
   -------------------------------------------------------------------------- */

section.category-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 52px 0 72px;
  margin: 0;
}

section.category-list a.category {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 22px 22px 20px;
  border: 1.5px solid var(--e-gray-200);
  border-radius: var(--e-radius-lg);
  background: var(--e-white);
  box-shadow: none;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}

section.category-list a.category:hover {
  border-color: var(--e-blue-500);
  box-shadow: var(--e-shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

section.category-list a.category h3 {
  position: relative;
  margin: 0;
  padding-left: 19px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--e-black);
  text-align: left;
}

/* Jellybean dot, cycled so the grid reads as colour-coded */
section.category-list a.category h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--e-dot, var(--e-yellow-500));
}

section.category-list a.category:nth-child(6n + 1) { --e-dot: var(--e-jb-lightblue); }
section.category-list a.category:nth-child(6n + 2) { --e-dot: var(--e-jb-yellow); }
section.category-list a.category:nth-child(6n + 3) { --e-dot: var(--e-jb-purple); }
section.category-list a.category:nth-child(6n + 4) { --e-dot: var(--e-jb-teal); }
section.category-list a.category:nth-child(6n + 5) { --e-dot: var(--e-jb-orange); }
section.category-list a.category:nth-child(6n + 6) { --e-dot: var(--e-jb-pink); }

section.category-list a.category p {
  margin: 0;
  padding-left: 19px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--e-gray-900);
  text-align: left;
}

section.category-list a.category p.article-count {
  margin-top: 6px;
  margin-left: 19px;
  padding: 4px 11px;
  border-radius: var(--e-pill);
  background: var(--e-gray-100);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--e-gray-800);
}

section.category-list a.category p:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   6. Two-column layout (category / article / search pages)
   Sidebar sits on the LEFT to match the Legal pages. To put it back on the
   right: delete the two `order` rules and flip the columns to `1fr 260px`.
   -------------------------------------------------------------------------- */

#contentArea .row-fluid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 64px;
  padding: 48px 0 96px;
}

#contentArea .row-fluid::before,
#contentArea .row-fluid::after {
  content: none;
}

#main-content.span9 {
  order: 2;
  width: auto;
  max-width: 720px;
  min-width: 0;
  margin: 0;
  float: none;
  /* The theme paints a faux panel edge/shadow here with bg-content2.png and
     pads the column to clear it; both have to go. */
  background: none;
  padding: 0;
}

/* No max-height/overflow here: scrolling this column clips the search
   field's focus ring and the suggestions dropdown that hangs below it.
   `order` also reverses paint order, so without a z-index the main column
   (order: 2) paints over the suggestions dropdown. */
aside#sidebar.span3 {
  order: 1;
  position: sticky;
  top: 90px;
  z-index: 30;
  width: auto;
  margin: 0;
  padding-right: 8px;
  float: none;
}

/* --------------------------------------------------------------------------
   7. Sidebar nav (the "On this page" TOC from the Legal pages)
   -------------------------------------------------------------------------- */

aside#sidebar h3 {
  margin: 0 0 12px;
  padding-left: 14px;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--e-gray-600);
}

aside#sidebar ul.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1.5px solid var(--e-gray-200);
  background: transparent;
}

aside#sidebar ul.nav-list > li {
  position: relative;
  margin: 0;
}

aside#sidebar ul.nav-list > li > a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-left: -1.5px;
  padding: 7px 14px;
  border-left: 2px solid transparent;
  border-radius: 0;
  background: none;
  font-size: 13.5px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--e-gray-800);
  text-shadow: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

aside#sidebar ul.nav-list > li > a:hover {
  background: none;
  color: var(--e-black);
  text-decoration: none;
}

aside#sidebar ul.nav-list > li.active > a,
aside#sidebar ul.nav-list > li > a.active {
  border-left-color: var(--e-blue-500);
  background: none;
  color: var(--e-blue-500);
  text-shadow: none;
}

aside#sidebar ul.nav-list i.icon-arrow {
  display: none !important;
}

/* --------------------------------------------------------------------------
   8. Category + search-results pages
   -------------------------------------------------------------------------- */

/* Title on the left, sort control on the right, description under the title */
hgroup#categoryHead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'title sort'
    'descrip sort';
  align-items: center;
  gap: 6px 20px;
  margin: 0 0 20px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--e-gray-200);
}

#serp > h1 {
  margin: 0 0 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--e-gray-200);
}

#categoryHead h1,
#serp h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--e-black);
}

#categoryHead h1 {
  grid-area: title;
}

/* Eyebrow above the category title, echoing the home hero */
#categoryHead h1::before {
  content: 'Category';
  display: block;
  margin-bottom: 10px;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--e-gray-600);
  background: radial-gradient(
      circle 4px at 4px 50%,
      var(--e-yellow-500) 0 100%,
      transparent 100%
    )
    no-repeat;
}

#categoryHead p.descrip,
#serp p.articlesFound {
  margin: 0;
  font-size: 15px;
  color: var(--e-gray-800);
}

#categoryHead p.descrip {
  grid-area: descrip;
}

/* Most categories have no description; don't reserve a row for it */
#categoryHead p.descrip:empty {
  display: none;
}

/* The theme positions this absolutely, which takes it out of the grid — the
   sort column then collapses to 0px and a long title runs underneath it. */
hgroup#categoryHead div.sort {
  grid-area: sort;
  position: relative;
  inset: auto;
  align-self: center;
  justify-self: end;
  margin: 0;
  float: none;
}

hgroup#categoryHead div.sort form {
  margin: 0;
}

hgroup#categoryHead div.sort select {
  appearance: none;
  -webkit-appearance: none;
  height: auto;
  margin: 0;
  padding: 9px 34px 9px 15px;
  border: 1.5px solid var(--e-gray-200);
  border-radius: var(--e-pill);
  background-color: var(--e-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23606060' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px 7px;
  box-shadow: none;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--e-black);
  cursor: pointer;
}

hgroup#categoryHead div.sort select:hover {
  border-color: var(--e-gray-400);
}

hgroup#categoryHead div.sort select:focus {
  outline: none;
  border-color: var(--e-blue-500);
  box-shadow: 0 0 0 3px rgba(87, 116, 252, 0.28);
}

#serp p.articlesFound strong,
#serp p.articlesFound b {
  font-weight: 700;
  color: var(--e-black);
}

section.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--e-gray-200);
}

ul.articleList {
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.articleList > li {
  margin: 0;
  border-bottom: 1px solid var(--e-gray-150);
}

ul.articleList > li:last-child {
  border-bottom: 0;
}

/* Category rows wrap their title in a <span>, search rows use a bare text
   node. Positioning the icon instead of using flex keeps wrapped lines
   aligned under the first line in both cases. */
ul.articleList > li > a {
  display: block;
  position: relative;
  padding: 13px 14px 13px 54px;
  border-radius: var(--e-radius-sm);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--e-black);
  transition: background-color 0.15s ease, color 0.15s ease;
}

ul.articleList > li > a:hover {
  background: var(--e-blue-50);
  color: var(--e-blue-500);
  text-decoration: none;
}

/* The theme underlines the inner span on hover, not the anchor */
ul.articleList > li > a span,
ul.articleList > li > a:hover span,
section.related ul li a span,
section.related ul li a:hover span {
  text-decoration: none;
}

/* The theme's icon-font glyph goes mushy at this size, so swap it for a
   masked Lucide "file-text" — the icon set the Ellii app already uses. The
   mask paints in currentColor, so the chip recolours on hover for free. */
ul.articleList > li > a i.icon-article-doc,
section.related ul li a i.icon-article-doc {
  position: absolute;
  left: 14px;
  /* centred on the first line of the title, not on the whole row */
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--e-gray-100);
  color: var(--e-gray-800);
  font-size: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

ul.articleList > li > a i.icon-article-doc::before,
section.related ul li a i.icon-article-doc::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  /* the theme sets margin-right: 6px here, which decentres it in the chip */
  margin: 0;
  background-color: var(--e-gray-800);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E") center / contain no-repeat;
}

ul.articleList > li > a:hover i.icon-article-doc,
section.related ul li a:hover i.icon-article-doc {
  background: var(--e-blue-500);
}

ul.articleList > li > a:hover i.icon-article-doc::before,
section.related ul li a:hover i.icon-article-doc::before {
  background-color: var(--e-white);
}

/* Search results carry an excerpt below the link; align it under the title */
ul.articleList > li > p {
  margin: -2px 0 14px;
  padding: 0 14px 0 54px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--e-gray-900);
}

section.pagination a,
section.pagination span {
  font-weight: 600;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   9. Article page — the Legal prose components
   -------------------------------------------------------------------------- */

.contentWrapper {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}

article#fullArticle {
  position: relative;
  font-size: 16px;
  line-height: 1.65;
  color: var(--e-gray-900);
}

article#fullArticle h1.title {
  margin: 0 0 24px;
  padding-right: 48px;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--e-black);
}

/* Print — a quiet icon-only affordance; the markup already carries
   title="Print this article" and an aria-label, so it needs no visible text */
article#fullArticle a.printArticle {
  position: absolute;
  top: 2px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 0;
  transition: background-color 0.15s ease;
}

article#fullArticle a.printArticle::after {
  content: none;
}

article#fullArticle a.printArticle i.icon-print {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
  font-size: 0;
}

article#fullArticle a.printArticle i.icon-print::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
  background-color: var(--e-gray-600);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6'/%3E%3Crect width='12' height='8' x='6' y='14' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6'/%3E%3Crect width='12' height='8' x='6' y='14' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: background-color 0.15s ease;
}

article#fullArticle a.printArticle:hover {
  background: var(--e-gray-100);
  text-decoration: none;
}

article#fullArticle a.printArticle:hover i.icon-print::before {
  background-color: var(--e-black);
}

/* Top-level section heading — yellow dot, echoing the numbered circles
   on the Legal pages */
article#fullArticle h1:not(.title) {
  position: relative;
  margin: 44px 0 16px;
  padding-left: 22px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--e-black);
}

article#fullArticle h1:not(.title)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.44em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--e-yellow-500);
}

article#fullArticle h2 {
  margin: 32px 0 12px;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--e-black);
}

article#fullArticle h3 {
  margin: 24px 0 10px;
  font-size: 17px;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--e-black);
}

article#fullArticle p {
  margin: 0 0 16px;
  line-height: 1.65;
}

article#fullArticle strong,
article#fullArticle b {
  font-weight: 700;
  color: var(--e-black);
}

article#fullArticle a {
  font-weight: 600;
  color: var(--e-blue-500);
}

article#fullArticle a:hover {
  color: var(--e-blue-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

article#fullArticle ul,
article#fullArticle ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

article#fullArticle li {
  margin-bottom: 8px;
  line-height: 1.6;
}

article#fullArticle hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--e-gray-150);
}

article#fullArticle code {
  padding: 2px 6px;
  border: 1px solid var(--e-gray-200);
  border-radius: 4px;
  background: var(--e-gray-100);
  font-size: 0.88em;
  color: var(--e-black);
}

article#fullArticle pre {
  padding: 16px 18px;
  border: 1px solid var(--e-gray-200);
  border-radius: var(--e-radius);
  background: var(--e-gray-50);
  font-size: 13px;
  line-height: 1.6;
  color: var(--e-black);
}

/* Blockquote → the blue Callout component */
article#fullArticle blockquote {
  margin: 18px 0 24px;
  padding: 16px 20px;
  border: 0;
  border-left: 4px solid var(--e-blue-500);
  border-radius: var(--e-radius);
  background: var(--e-blue-50);
  font-size: 14px;
  color: var(--e-gray-900);
}

article#fullArticle blockquote p:last-child {
  margin-bottom: 0;
}

article#fullArticle img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--e-gray-200);
  border-radius: var(--e-radius);
}

article#fullArticle iframe {
  max-width: 100%;
  border-radius: var(--e-radius);
}

article#fullArticle table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 14px;
}

article#fullArticle th,
article#fullArticle td {
  padding: 10px 14px;
  border: 1px solid var(--e-gray-200);
  text-align: left;
}

article#fullArticle th {
  background: var(--e-gray-50);
  font-weight: 700;
  color: var(--e-black);
}

/* --------------------------------------------------------------------------
   10. Article footer — the "Questions about this policy?" card
   -------------------------------------------------------------------------- */

/* Quiet strip, not a feature panel: prompt + CTA together on the left,
   last-updated date held on the right */
section.articleFoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 40px;
  padding: 14px 18px;
  border: 1px solid var(--e-gray-200);
  border-radius: var(--e-radius);
  background: var(--e-gray-50);
  text-align: left;
}

/* The theme sets Georgia on this block and everything inside it */
section.articleFoot,
section.articleFoot * {
  font-family: var(--e-font);
  font-style: normal;
}

section.articleFoot i.icon-contact {
  display: none;
}

section.articleFoot p.help {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--e-black);
}

section.articleFoot p.help a.contactUs,
section.articleFoot p.help a#sbContact,
section.articleFoot p.help a#sbContactMobile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--e-pill);
  background: var(--e-blue-500);
  /* the theme colours these grey via their ids, so match that weight */
  color: var(--e-white);
  font-size: 13px;
  font-weight: 600;
  text-shadow: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

section.articleFoot p.help a.contactUs:hover,
section.articleFoot p.help a#sbContact:hover,
section.articleFoot p.help a#sbContactMobile:hover {
  background: var(--e-blue-700);
  color: var(--e-white);
  text-decoration: none;
}

section.articleFoot p.help a.contactUs:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(87, 116, 252, 0.35);
}

/* Docs ships a desktop and a mobile Contact link; show one at a time */
section.articleFoot p.help a#sbContactMobile {
  display: none;
}

section.articleFoot time.lu {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 13px;
  color: var(--e-gray-800);
}

/* --------------------------------------------------------------------------
   10b. Related articles
   -------------------------------------------------------------------------- */

section.related {
  margin: 40px 0 0;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid var(--e-gray-200);
  background: none;
  box-shadow: none;
}

section.related,
section.related * {
  font-family: var(--e-font);
}

section.related h3 {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--e-gray-600);
}

section.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

section.related ul li {
  margin: 0;
  border-bottom: 1px solid var(--e-gray-150);
}

section.related ul li:last-child {
  border-bottom: 0;
}

section.related ul li a {
  display: block;
  position: relative;
  padding: 12px 14px 12px 54px;
  border-radius: var(--e-radius-sm);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--e-black);
  transition: background-color 0.15s ease, color 0.15s ease;
}

section.related ul li a i.icon-article-doc {
  top: 9px;
}

section.related ul li a:hover {
  background: var(--e-blue-50);
  color: var(--e-blue-500);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

#contentArea footer,
body > footer {
  margin: 0;
  padding: 28px var(--e-gutter);
  border-top: 1px solid var(--e-gray-200);
  background: var(--e-white);
  text-align: left;
}

#contentArea footer p,
body > footer p {
  max-width: var(--e-max);
  margin: 0 auto;
  text-align: left;
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--e-gray-700);
}

#contentArea footer a,
body > footer a {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--e-gray-700);
}

#contentArea footer a:hover,
body > footer a:hover {
  color: var(--e-black);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   12. Empty states / 404
   -------------------------------------------------------------------------- */

#noResults,
#errorContainer {
  max-width: var(--e-max);
  margin: 0 auto;
  padding: 72px var(--e-gutter);
  text-align: center;
  color: var(--e-gray-800);
}

#errorContainer h1 {
  font-size: 38px;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--e-black);
}

#errorContainer i.icon-error {
  color: var(--e-yellow-700);
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  :root {
    --e-gutter: 24px;
  }

  #docsSearch {
    padding: 44px 0 40px;
  }

  section.category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 36px 0 52px;
  }

  #contentArea .row-fluid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 32px 0 64px;
  }

  #main-content.span9 {
    max-width: none;
  }

  /* Stack the article above the category list on small screens */
  aside#sidebar.span3 {
    order: 3;
    position: relative;
    top: 0;
    max-height: none;
    overflow: visible;
    padding-top: 24px;
    border-top: 1px solid var(--e-gray-200);
  }

  article#fullArticle h1.title {
    font-size: 30px;
    padding-right: 0;
  }

  article#fullArticle a.printArticle {
    display: none;
  }
}

@media (max-width: 720px) {
  #mainNav .container-fluid {
    padding: 12px var(--e-gutter);
    flex-wrap: wrap;
  }

  #mainNav ul.nav {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 8px 0 4px;
  }

  #mainNav ul.nav > li > a {
    justify-content: flex-start;
    border-radius: var(--e-radius);
  }

  /* The button's label is hidden at this width, so keep the row layout and
     shrink it to a circular icon rather than a full-width bar. The theme
     stacks this form at mobile widths from a selector this cannot outrank,
     hence the one !important. */
  #docsSearch form#searchBar {
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    padding: 5px;
  }

  #docsSearch form#searchBar input.search-query {
    padding: 10px 4px 10px 16px;
    font-size: 15px;
    text-align: left;
  }

  #docsSearch form#searchBar button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
  }

  section.category-list {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Stack the sort control under the title rather than squeezing it */
  hgroup#categoryHead {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'title'
      'descrip'
      'sort';
    gap: 14px;
  }

  hgroup#categoryHead div.sort {
    justify-self: start;
  }

  section.articleFoot time.lu {
    margin-left: 0;
  }

  section.articleFoot p.help a#sbContact {
    display: none;
  }

  section.articleFoot p.help a#sbContactMobile {
    display: inline-flex;
  }
}

/* --------------------------------------------------------------------------
   14. Print
   -------------------------------------------------------------------------- */

@media print {
  #mainNav,
  aside#sidebar,
  article#fullArticle a.printArticle,
  section.related,
  section.articleFoot,
  #docsSearch form#searchBar,
  footer {
    display: none !important;
  }

  #contentArea .row-fluid {
    display: block;
    padding: 0;
  }

  #main-content.span9 {
    max-width: none;
  }

  article#fullArticle h1.title {
    border-bottom: 2px solid var(--e-black);
    padding-bottom: 12px;
  }
}
