/* The palette of eazybi.com: copied from css/base/colors.css of the eazybi_static repository.
   Nothing copies a change over, so when a colour changes there, change it here by hand. */

:root {
  --ink:          #0e1320;
  --ink-soft:     #3a4050;
  --ink-muted:    #5b6070;
  --ink-faint:    #8a8f9c;
  --ink-raised:   #1b2235;

  --paper:        #f3f3f3;
  --white:        #ffffff;
  --line:         #dcdde0;

  --accent:       #4146d6;
  --accent-dark:  #262bb8;
  --accent-deep:  #1f24a8;
  --accent-light: #8f92f0;
  --accent-pale:  #d4d5fa;

  --error:        #c9372c;

  /* Not on eazybi.com: tip and note panels, status lozenges */
  --success:      #00875a;
  --warning:      #ff8b00;
  /* The warning colour where it has to stand out at 3:1, as an icon on its panel does */
  --warning-dark: #b35900;
}
:root {
  /* Copied from css/base/layout.css of eazybi_static; change it here by hand when it changes there */
  --page-side-padding: clamp(20px, 4vw, 40px);
  --site_header_height: 64px;
  --height_below_header: calc(100vh - var(--site_header_height));

  --page_tree_width: 350px;
  --page_text_width: 688px;
  --page_column_gap: 24px;
  --page_columns: minmax(240px, var(--page_tree_width)) minmax(0, 1fr);
  --page-max-width: calc(var(--page_tree_width) + 3 * var(--page_column_gap) + var(--page_text_width) +
    2 * var(--page-side-padding));
}

.page_layout {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 var(--page-side-padding);
}

#page .page_layout {
  display: grid;
  grid-template-columns: var(--page_columns);
  gap: var(--page_column_gap);
  align-items: start;
}

.page_column { padding-top: 24px; }

@media screen and (max-width: 960px) {
  /* The search box takes a second header row */
  :root { --site_header_height: 109px; }

  #page .page_layout {
    display: block;
    padding: 0;
  }

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

:root {
  --border-radius: 3px;
  --border-radius-card: 7px;
  --shadow_raised: 0 18px 44px color-mix(in srgb, var(--ink) 12%, transparent);
}

/* Only for a reader who has not asked for less motion (WCAG 2.3.3) */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Clear of the sticky header when an anchor is scrolled to. As a scroll-padding-top of the page it covered the
   search box in the header too, and the browser scrolled the page to reveal the box at every keystroke. */
.page_layout [id] { scroll-margin-top: calc(var(--site_header_height) + 16px); }

/* The same for what the keyboard scrolls into view, or the header would cover it (WCAG 2.4.11). Not the page tree,
   which scrolls on its own below the header. */
main :is(a, button, input, summary, [tabindex]) { scroll-margin-top: calc(var(--site_header_height) + 16px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;

  &:has(.open_menu) { overflow: hidden; }
}

/* Twice, or browsers shrink monospace to 13px */
pre,
code { font-family: monospace, monospace; }

b,
strong { font-weight: 600; }

button,
input {
  margin: 0;
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

a {
  /* Rounds the focus ring, as the page tree links have it */
  border-radius: var(--border-radius);
  color: var(--accent);
  text-decoration: none;

  &:hover { color: var(--accent-dark); }
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }

.page_labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page_labels span {
  padding: 3px 8px;
  border-radius: var(--border-radius);
  background: color-mix(in srgb, var(--accent-pale) 60%, var(--white));
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.visually_hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The sections of the selected product; data-filter is set in <head>, so nothing moves after the page is painted */
.eazybi_section { display: none; }

html[data-filter="eazybi-all"] .eazybi_section.eazybi-all,
html[data-filter="eazybi-for-jira"] .eazybi_section.eazybi-for-jira,
html[data-filter="eazybi-for-confluence"] .eazybi_section.eazybi-for-confluence,
html[data-filter="private-eazybi"] .eazybi_section.private-eazybi { display: block; }

img.emoticon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}
/* The inline icons of DocsHelper#icon and ContentHtml, as eazybi.com draws them. The outline takes the text colour
   and the icon_accent group --icon-accent. The 24 px grid has a 2 px padding, so a 24 px icon draws 20 px large.
   Scoped to svg, because Confluence puts an icon class of its own on some of its markup. */

svg.icon {
  display: inline-block;
  flex: none;
  width: var(--icon-size, 24px);
  height: var(--icon-size, 24px);
  vertical-align: middle;

  .icon_accent { color: var(--icon-accent, var(--accent)); }
}
/* The message takes what the footer line leaves of the window, so that the line is in the first screen */

#error .page_layout {
  display: flex;
  flex-direction: column;
  min-height: var(--height_below_header);

  main { flex: 1; }
}

#error article {
  padding: 20vh 0 10vh;
  text-align: center;

  h1 { margin: 0 0 16px; }

  /* The digits of the 404 page */
  .error_code {
    display: flex;
    justify-content: center;
    margin: 0;
    font-size: 140px;

    span {
      display: inline-block;
      padding: 0 16px;
      color: var(--error);

      /* Once, and over within five seconds, so that nothing needs a way to stop it (WCAG 2.2.2) */
      @media (prefers-reduced-motion: no-preference) {
        animation: number_movement 8s ease-in-out;
      }
    }

    div {
      overflow: hidden;

      &:nth-of-type(1) span { animation-delay: .2s; }
      &:nth-of-type(2) span { animation-delay: .4s; }
      &:nth-of-type(3) span { animation-delay: .6s; }
    }
  }

  .error_description {
    margin: 0;
    font-size: 24px;
  }

  .error_sub_description {
    display: block;
    margin-top: 10px;
    font-size: 14px;
  }
}

@keyframes number_movement {
  0%, 20%, 42%, 100% { translate: 0; }
  30% { translate: 0 400px; }
  31% { translate: 400px -400px; }
  32% { translate: 0 -400px; }
}
/* The product pills, of the page column and of the drawer of the page tree */

.filters a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;

  &:hover { color: var(--accent); }
}

/* Below 960px the drawer's pills replace them, see sidebar.css */
section.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;

  @media (max-width: 960px) { display: none; }
}
.page_footer {
  padding: 40px var(--page-side-padding) 120px;
  font-size: 14px;
  color: var(--ink-muted);
  text-align: center;

  @media screen and (max-width: 960px) { padding-bottom: 60px; }
}

.footer_line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;

  .emoji { font-size: 17px; }

  .claude_code_logo {
    width: 20px;
    height: 20px;
  }
}
#main_nav {
  position: sticky;
  top: 0;
  z-index: 2000;
  height: var(--site_header_height);
  background: var(--white);
  border-bottom: 1px solid var(--line);

  .main_nav_content {
    display: grid;
    grid-template-columns: var(--page_columns);
    align-items: center;
    gap: var(--page_column_gap);
    max-width: var(--page-max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--page-side-padding);
  }

  .logo {
    display: flex;
    align-items: center;
    justify-self: start;
    gap: 10px;
    /* Lighter than the logo beside it, which is the brand; this names the space */
    color: var(--ink-soft);
    font-size: 18px;
    font-weight: 500;

    img { height: 31px; }

    &:hover { color: var(--accent); }
  }

  .site_search { height: 40px; }

  .menu_icon {
    display: none;
    width: 48px;
    height: 48px;
    margin: 0 calc(var(--page-side-padding) - 12px) 0 auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    cursor: pointer;

    .icon { --icon-size: 28px; }

    .menu_icon_close,
    &[aria-expanded="true"] .menu_icon_open { display: none; }

    &[aria-expanded="true"] .menu_icon_close { display: inline-block; }
  }
}

@media screen and (max-width: 960px) {
  #main_nav {
    .main_nav_content {
      display: flex;
      flex-wrap: wrap;
      gap: 0;
      padding: 0;
    }

    .logo {
      height: 56px;
      padding-left: var(--page-side-padding);
      font-size: 16px;

      img { height: 26px; }
    }

    /* The error pages have no page tree for it to open */
    .menu_icon {
      body:has(#page_tree) & { display: block; }
    }

    .site_search {
      flex-basis: 100%;
      height: 52px;
      padding: 0 var(--page-side-padding) 12px;
    }
  }
}
.site_search {
  position: relative;
  height: 100%;
}

.site_search_form {
  position: relative;
  height: 100%;

  /* The padding of the icon grid keeps the glyph 14px from the edge */
  .icon {
    position: absolute;
    top: 50%;
    left: 10px;
    color: var(--ink-muted);
    translate: 0 -50%;
  }
}

.site_search_input {
  width: 100%;
  height: 100%;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line);
  border-radius: var(--border-radius-card);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;

  &::placeholder { color: var(--ink-muted); }
  &:hover { background: color-mix(in srgb, var(--paper), var(--ink) 4%); }

  &:focus {
    background: var(--white);
    outline: 2px solid var(--accent);
    outline-offset: 0;
  }
}

.site_search_results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 1000;
  max-height: 70vh;
  padding: 8px;
  overflow: auto;
  /* So that an option scrolled into view keeps the padding around it */
  scroll-padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--border-radius-card);
  background: var(--white);
  box-shadow: var(--shadow_raised);

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

  /* The results of the previous query, while the next one loads */
  &[aria-busy="true"] ul { opacity: .5; }
}

.quicksearch_status {
  margin: 6px 12px 10px;
  color: var(--ink-muted);
}

.quicksearch_result {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 4px 12px;
  padding: 10px 12px;
  border-radius: var(--border-radius);
  color: var(--ink);
  line-height: 1.3;

  .page_labels { justify-content: flex-end; }

  .sp-search-highlight {
    color: var(--accent);
    font-weight: 600;
  }
}

.quicksearch_path {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 13px;
}

.quicksearch_all {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);

  a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
  }
}

/* quicksearch.js moves aria-selected with the pointer too, so only one result is ever highlighted */
[role="option"][aria-selected="true"] a { background: var(--paper); }

@media screen and (max-width: 960px) {
  /* Full header width, under the padding of the search row */
  #main_nav .site_search_results {
    top: 100%;
    max-height: var(--height_below_header);
    padding: 0;
    border-width: 1px 0 0;
    border-radius: 0;

    a {
      padding: 14px var(--page-side-padding);
      border-radius: 0;
    }

    .quicksearch_status { margin: 12px var(--page-side-padding); }
  }
}
/* Fills the viewport below the header; only .page_list scrolls */

aside {
  position: sticky;
  top: var(--site_header_height);
  display: flex;
  flex-direction: column;
  height: var(--height_below_header);
  /* The tree takes its width from here */
  container-type: inline-size;
}

nav.filters { display: none; }

.page_list {
  flex: 1;
  /* Into the gutters on either side: room for a focus ring and, on the right, for the scrollbar */
  margin: 0 -20px 0 -10px;
  padding: 24px 0 48px 10px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  /* Fades the tree where it scrolls out of sight, within the padding, so nothing faded is still in place */
  mask-image: linear-gradient(transparent, #000 24px, #000 calc(100% - 48px), transparent);
  font-size: 15px;
  -webkit-user-select: none;
  user-select: none;

  ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
  }

  /* Not the width a scrollbar leaves */
  > ul { width: 100cqw; }

  li { position: relative; }

  a {
    display: block;
    /* Not a height, which would clip a title a reader has spaced out (WCAG 1.4.12) */
    min-height: 32px;
    padding: 6px 8px;
    overflow: hidden;
    border-radius: var(--border-radius);
    color: var(--ink-soft);
    white-space: nowrap;
    text-overflow: ellipsis;

    &:hover { color: var(--accent); }

    &.current {
      background: var(--white);
      color: var(--ink);
      font-weight: 600;
    }
  }

  .collapsed .page_list_sub { display: none; }

  .page_link_toggle {
    position: absolute;
    top: 0;
    /* 24px wide, the smallest target WCAG 2.5.8 allows, reaching into the indentation of the list */
    left: -24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: var(--border-radius);
    background: none;
    color: var(--ink-muted);
    cursor: pointer;

    &::before {
      content: "";
      width: 18px;
      height: 18px;
      background: currentColor;
      mask: url(/assets/icons/chevron-right-1359b034d337c79502bb11a04cf3b3bbc60e5c05bd0d1152cebccf8231779f1a.svg) center / contain no-repeat;
    }

    &:hover { color: var(--accent); }
  }

  .open > .page_link_toggle::before { rotate: 90deg; }

  /* Clear of the faded edges when the keyboard scrolls the list */
  a,
  .page_link_toggle { scroll-margin-block: 24px 48px; }
}

@media screen and (max-width: 960px) {
  aside {
    position: fixed;
    top: var(--site_header_height);
    bottom: 0;
    left: -100%;
    z-index: 1000;
    width: 100%;
    height: auto;
    background: var(--paper);
    /* Hidden rather than only moved aside, or the keyboard would walk through the closed drawer */
    visibility: hidden;

    /* Visible at once when it opens, so that page_tree_drawer.js can move the focus into it */
    &.open_menu {
      left: 0;
      visibility: visible;
    }

    /* It slides only for a reader who has not asked for less motion (WCAG 2.3.3). Visibility transitions as
       visible, so the drawer stays visible while it slides out. */
    @media (prefers-reduced-motion: no-preference) {
      transition: left .4s, visibility .4s;

      &.open_menu { transition: left .4s; }
    }
  }

  nav.filters {
    display: flex;
    gap: 8px;
    /* One row, scrolling sideways, rather than four rows above the tree */
    padding: 12px var(--page-side-padding);
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;

    a { flex: none; }
  }

  .page_list {
    margin: 0;
    padding: 24px var(--page-side-padding) 48px;

    ul { padding-left: 0; }
    > ul { width: auto; }

    /* 16px a level rather than 20px, so that a title five levels deep keeps most of the width of a phone */
    .page_list_sub { margin-left: 16px; }

    /* 44px, the target a thumb needs */
    a {
      display: flex;
      align-items: center;
      min-height: 44px;
      padding: 10px 8px;
      white-space: normal;
    }

    /* Only a parent keeps room for its toggle */
    li:not(.leaf) > a { margin-right: 44px; }

    .page_link_toggle {
      right: 0;
      left: auto;
      width: 44px;
      height: 44px;
    }
  }
}
/* Rendered as details and summary by ContentHtml#render_expand_macros */

details.expand-container {
  > summary {
    display: flex;
    align-items: baseline;
    gap: 6px;
    width: fit-content;
    margin: 10px 0 16px;
    color: var(--accent);
    font-size: 15px;
    list-style: none;
    cursor: pointer;

    &::-webkit-details-marker { display: none; }

    &::before {
      content: "";
      flex: none;
      align-self: center;
      width: 16px;
      height: 16px;
      background: currentColor;
      mask: url(/assets/icons/chevron-right-1359b034d337c79502bb11a04cf3b3bbc60e5c05bd0d1152cebccf8231779f1a.svg) center / contain no-repeat;
    }

    &:hover .expand-control-text { text-decoration: underline; }
  }

  &[open] > summary::before { rotate: 90deg; }
}
/* Each panel kind sets its colour and icon */

.confluence-information-macro {
  --panel_colour: var(--ink-faint);
  position: relative;
  margin: 16px 0;
  padding: 12px 16px 12px 44px;
  border-left: 3px solid var(--panel_colour);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  background: color-mix(in srgb, var(--panel_colour) 8%, var(--white));

  &.has-no-icon { padding-left: 16px; }

  /* A mask draws the icon in one colour. The padding of the icon grid keeps the glyph 16px from the border. */
  .confluence-information-macro-icon {
    position: absolute;
    top: 12px;
    left: 13px;
    width: 24px;
    height: 24px;
    background: var(--panel_icon_colour, var(--panel_colour));
    mask: var(--panel_icon) center / contain no-repeat;
  }

  .confluence-information-macro-body {
    display: flex;
    flex-direction: column;
    gap: 10px;

    > * { margin: 0; }
    > p:empty { display: none; }
  }

  > .title { font-weight: 600; }
}

.confluence-information-macro-information {
  --panel_colour: var(--accent);
  --panel_icon: url(/assets/icons/circle-info-ede7276c62c81719e999a132490fa5fd39b9f4098982824cb03f70c252332b83.svg);
}

.confluence-information-macro-tip {
  --panel_colour: var(--success);
  --panel_icon: url(/assets/icons/square-check-e2d224b1de49370f4ba8d7b013513fa5def6cac834ecc6d82d92b8d98e939eea.svg);
}

.confluence-information-macro-note {
  --panel_colour: var(--warning);
  /* The icon says what kind of panel it is, so it needs 3:1 (WCAG 1.4.11); the border and the tint do not */
  --panel_icon_colour: var(--warning-dark);
  --panel_icon: url(/assets/icons/triangle-exclamation-a1c8de63525f18b5140fe535d01d41ad19eb7a6fac41d3acdfab1c1d820f572e.svg);
}

.confluence-information-macro-warning {
  --panel_colour: var(--error);
  --panel_icon: url(/assets/icons/circle-exclamation-e5f18d2c9bf238e19f75dceeccb084f4f70579a6aaaa366212c9ae5a3eb5e239.svg);
}
/* A list of links rather than prose, so it is spaced tighter than the lists of the body text */

.wiki-content .toc-macro {
  line-height: 1.4;

  ul { margin-bottom: 0; }
  > ul { margin-bottom: 16px; }
  li > ul { margin-top: 4px; }
  li:not(:last-of-type) { margin-bottom: 4px; }

  /* Holds the headings above the first top level one, see ContentHtml#contents_list */
  .toc-empty-item { list-style: none; }
}

.aui-lozenge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: var(--border-radius);
  background: var(--ink-muted);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
}

/* Cloud's aui-lozenge-current */
.aui-lozenge-complete { background: var(--accent); }
.aui-lozenge-success { background: var(--success); }
.aui-lozenge-error { background: var(--error); }
/* Phones still reach the page tree through the menu button */

@media screen and (min-width: 961px) {
  #home aside { display: none; }
}

#home section.filters {
  align-items: center;
  margin: 32px 0 20px;
}

.filters_label {
  margin-right: 4px;
  color: var(--ink-muted);
  font-size: 15px;
}

[data-space="Partners"] .home_content { padding-top: 32px; }

/* A phone has the product filter in the drawer of the page tree alone, so the cards open the page */
@media (max-width: 960px) {
  .home_content { padding-top: 20px; }
}

/* The cards of the selected product, as the sections in base/general.css */
.eazy_cards {
  display: none;
  gap: 20px;

  [data-space="Partners"] & {
    display: flex;
    flex-wrap: wrap;

    .panel { flex: 1 1 300px; }
  }

  html[data-filter="eazybi-all"] &.eazybi-all,
  html[data-filter="eazybi-for-jira"] &.eazybi-for-jira,
  html[data-filter="eazybi-for-confluence"] &.eazybi-for-confluence,
  html[data-filter="private-eazybi"] &.private-eazybi { display: grid; }

  /* The links of a card are set apart by their own padding rather than by a margin of the paragraph, so that a
     click between two of them still lands on one */
  p {
    margin: 0;

    a {
      display: inline-block;
      padding: 3px 0;

      &:hover { text-decoration: underline; }
    }
  }
}

/* The cards of a home page and of its support section look alike. Both are Confluence panels inside a section
   the page names with the section helper, see doc/home_page_content.md for what a page has to hold. */
.eazy_cards .panel,
.support_section .panel {
  --card_padding: 28px;
  position: relative;
  padding: var(--card_padding);
  border-radius: var(--border-radius-card);
  background: var(--white);

  &:hover { box-shadow: var(--shadow_raised); }

  .icon { display: block; }
}

/* A card of links is centred: its icon, its heading and the links below them */
.eazy_cards .panel {
  --card_icon_size: 56px;
  --card_icon_gap: 16px;
  text-align: center;

  /* 12px down to the text of the first link, 3px of which are the padding of that link */
  :is(h1, h2) { margin-bottom: 9px; }

  /* A stroke of the icon grid would be 5px wide at this size, so it is drawn thinner, and in the accent colours */
  .icon {
    --icon-size: var(--card_icon_size);
    --icon-accent: var(--accent-light);
    margin: 0 auto var(--card_icon_gap);
    color: var(--accent);
    stroke-width: 1.25;
  }

  /* The heading link reaches up over the icon, so that the icon leads where the heading does, product filter
     included */
  :is(h1, h2) a::before {
    content: "";
    position: absolute;
    inset: var(--card_padding) calc(50% - var(--card_icon_size) / 2) auto;
    height: calc(var(--card_icon_size) + var(--card_icon_gap));
  }

  /* The icon answers the heading link, which is what a pointer over the icon is on: its colours deepen */
  &:has(:is(h1, h2) a:is(:hover, :focus-visible)) .icon {
    --icon-accent: var(--accent);
    color: var(--accent-dark);
  }
}

/* Moved out by the padding of the icon grid, so that the glyph lines up with the text */
.support_section .panel .icon {
  --icon-size: 40px;
  margin: -3px 0 17px -3px;
}

.eazy_cards :is(h1, h2),
.support_section h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;

  a {
    color: var(--ink);

    /* The eazybi.com link arrow, as a mask so it takes the text colour */
    &::after {
      content: "";
      display: inline-block;
      width: 16px;
      height: 16px;
      margin-left: 6px;
      vertical-align: middle;
      background: currentColor;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
      transition: transform .25s cubic-bezier(.2, .7, .2, 1);
    }
  }
}

.eazy_cards :is(h1, h2) a {
  &:hover { color: var(--accent); }

  /* After a centred heading it hangs outside the text, which would otherwise sit off the centre by its width.
     The top margin centres it on the line, where vertical-align no longer applies. */
  &::after {
    position: absolute;
    margin-top: calc((1.25em - 16px) / 2);
  }
}

.support_section .panel:hover h3 a { color: var(--accent); }

/* The arrows move only for a reader who has not asked for less motion (WCAG 2.3.3); they still mark the link */
@media (prefers-reduced-motion: no-preference) {
  .eazy_cards :is(h1, h2) a:is(:hover, :focus-visible)::after,
  .support_section .panel:hover h3 a::after { transform: translateX(4px); }
}

.support_section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
  /* The footer line below it brings its own room */
  padding-top: clamp(56px, 7vw, 88px);

  > h2,
  > p { grid-column: 1 / -1; }

  > h2 {
    margin: 0;
    font-size: clamp(30px, 3.4vw, 44px);
  }

  /* The lead: 16px below the heading and 32px above the cards, with the gap of the grid */
  > p {
    margin: -4px 0 12px;
    /* One line on a desktop, two even ones where it has to wrap */
    text-wrap: balance;
    color: var(--ink-soft);
    font-size: 18px;
    line-height: 1.55;
  }

  /* The heading link covers the card, so the whole card is the link */
  h3 a::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-card);
  }

  .panel p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.5;
  }
}

/* Every product has the same six cards */
body:not([data-space="Partners"]) .eazy_cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));

  @media (max-width: 960px) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @media (max-width: 600px) { grid-template-columns: minmax(0, 1fr); }
}
/* --card_padding_x lets the search results run to the card edges */

.page_content {
  --card_padding_x: var(--page_column_gap);
  padding: 28px var(--card_padding_x) 40px;
  border-radius: var(--border-radius-card);
  background: var(--white);

  h1.content_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin: 0 0 24px;

    .page_labels { margin-top: 6px; }

    @media screen and (max-width: 700px) {
      display: block;

      .page_labels { margin-top: 8px; }
    }
  }
}

.wiki-content {
  line-height: 1.6;
  overflow-wrap: break-word;

  h2 { margin: 40px 0 12px; }
  h3 { margin: 32px 0 8px; }
  h4 { margin: 24px 0 8px; }
  > :first-child { margin-top: 0; }
  p { margin: 0 0 16px; }

  blockquote {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 0 16px;
    padding: 2px 16px;
    border-left: 3px solid var(--line);
    color: var(--ink-soft);

    > * { margin: 0; }
  }

  img { height: auto; }

  /* The space of the player until the async Wistia script defines the element, as Wistia's own embed code
     reserves it: a page growing above a heading after the browser has scrolled to it leaves the reader short */
  wistia-player:not(:defined) {
    display: block;
    aspect-ratio: 16 / 9;
  }

  hr {
    border: none;
    height: 1px;
    background: var(--line);
  }

  ul, ol { margin: 0 0 16px; }

  li > ul,
  li > ol,
  ul > ul,
  ol > ol { margin-top: 10px; }

  li:not(:last-of-type) { margin-bottom: 6px; }

  a:hover {
    text-decoration: underline;
    color: var(--accent-dark);
  }

  .confluence-embedded-file-wrapper .confluence-embedded-image {
    margin: 0;
    max-width: 100%;
  }

  /* Cloud puts a lone image in an inline span, so the gap goes on the image */
  .confluence-embedded-file-wrapper:has(+ p) .confluence-embedded-image { margin-bottom: 16px; }

  /* The file name under an attachment card's image; the wrapper span is inline */
  .confluence-embedded-file-wrapper:has(.confluence-embedded-image) .confluence-embedded-file {
    display: block;
  }

  pre.syntaxhighlighter-pre {
    margin: 0;
    padding: 12px 16px;
    overflow-x: auto;
    border-radius: var(--border-radius);
    background: var(--paper);
    font-size: 14px;
    line-height: 1.5;
  }

  .code.panel { margin: 0 0 16px; }

  code {
    display: inline-block;
    padding: 1px 5px;
    margin: 2px 0;
    border-radius: var(--border-radius);
    background: var(--paper);
    font-size: 14px;
    line-height: 1.4;
    word-break: break-all;
  }

  th code { word-break: normal; }
}

.table-wrap {
  overflow-x: auto;
  & + p { margin-top: 16px; }
}

.confluenceTable {
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;

  .confluenceTh,
  .confluenceTd {
    min-width: 8px;
    border: 1px solid var(--line);
    padding: 8px 12px;
    vertical-align: top;

    p + .content-wrapper { margin-top: 10px; }

    /* The paragraph margin spaces the paragraphs of a cell apart, and the cell padding is the space below the last */
    > :last-child { margin-bottom: 0; }
  }

  .confluenceTh {
    background: var(--paper);
    font-weight: 600;
    text-align: left;

    > * { margin: 0 0 10px; }
  }

  .confluenceTd.highlight-red { background: color-mix(in srgb, var(--error) 10%, var(--white)); }
}

.content-wrapper + .content-wrapper { margin-top: 10px; }

@media screen and (max-width: 960px) {
  .page_content {
    --card_padding_x: var(--page-side-padding);
    min-height: var(--height_below_header);
    padding: 20px var(--card_padding_x) 40px;
    border-radius: 0;
  }
}
.content_search_header {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 20px;
  font-weight: 400;

  span {
    color: var(--ink);
    font-size: 22px;
    font-weight: 600;
  }
}

/* A container, so that a result lays its header out by the room the results have, not by the window */
.search_results {
  container-type: inline-size;
  margin: 0 calc(-1 * var(--card_padding_x)) 20px;
}

.search-result {
  display: block;
  padding: 20px var(--card_padding_x);
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--line);
  /* Square for the accent border on its left, which the rounded links of base/general.css would bend */
  border-radius: 0;

  &:first-of-type { border-top: 1px solid var(--line); }

  &:hover {
    border-left-color: var(--accent);
    background: color-mix(in srgb, var(--accent-pale) 25%, var(--white));
  }

  header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
  }

  /* The title does not shrink for the labels, which wrap from the right in what is left */
  h2 {
    flex: none;
    max-width: 70%;
    margin: 0;
    color: var(--accent);
    font-size: 18px;

    .sp-search-highlight { color: var(--accent-deep); }
  }

  .page_labels { justify-content: flex-end; }

  p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.5;
    overflow-wrap: anywhere;

    .sp-search-highlight {
      color: var(--ink);
      font-weight: 600;
    }
  }
}

.pager {
  text-align: center;

  a:hover { text-decoration: underline; }
}

/* Too narrow for the labels beside the title: they go below it */
@container (max-width: 640px) {
  .search-result header {
    display: block;

    h2 { max-width: none; }

    .page_labels {
      justify-content: flex-start;
      margin-top: 8px;
    }
  }
}
/* data-filter is set on <html> in <head>, so nothing flashes */

/* The selected product, in the pills and in the drawer of the page tree */

:is(
  html[data-filter="eazybi-all"] [data-filter="eazybi-all"],
  html[data-filter="eazybi-for-jira"] [data-filter="eazybi-for-jira"],
  html[data-filter="eazybi-for-confluence"] [data-filter="eazybi-for-confluence"],
  html[data-filter="private-eazybi"] [data-filter="private-eazybi"]
) {
  .filters & {
    background: var(--accent);
    color: var(--white);
    pointer-events: none;
  }
}

html[data-filter="eazybi-for-jira"] .page_list li[data-labels]:not([data-labels~="eazybi-for-jira"]):not([data-labels~="eazybi-all"]),
html[data-filter="eazybi-for-confluence"] .page_list li[data-labels]:not([data-labels~="eazybi-for-confluence"]):not([data-labels~="eazybi-all"]),
html[data-filter="private-eazybi"] .page_list li[data-labels]:not([data-labels~="private-eazybi"]):not([data-labels~="eazybi-all"]) {
  display: none;
}
/* legacy-color-text-* came from the migration. blue3 and default are body text and must stay
   uncoloured, or the links they wrap lose their colour; the rarest ones are left to body text. */

.wiki-content {
  /* See ContentHtml::TEXT_COLOUR_CLASSES */
  .text_color_red { color: var(--error); }

  /* Storage: #c9372c */
  .legacy-color-text-red2 { color: var(--error); }

  /* Storage: #ae2e24 */
  .legacy-color-text-orange1 { color: var(--error); }

  /* Storage: #44546f */
  .legacy-color-text-gray2 { color: var(--ink-soft); }

  /* Storage: #6e5dc6, kept apart from the accent so it does not read as a link */
  .legacy-color-text-gray1 { color: #6e5dc6; }

  /* Links the migration could not resolve */
  a.unresolved {
    color: inherit;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
  }
}
/*


















 */

