/**
 * Shared styles.
 */

/**
 * Variables.
 */
:root {
  --color-background: #fff;
  --color-background-feature: #f6f6f6;
  --color-background-feature-hover: #fbfbfb;
  --color-background-shortcut: rgba(0, 0, 0, 0.08);

  --color-text: #141414;
  --color-text-secondary: #797979;
  --color-text-shortcut: color: rgba(0, 0, 0, 0.6);

  --color-border-feature: #f0f0f0;
  --color-border-divider: #e7e7e7;
  --color-heading-border: rgba(127, 127, 127, 0.2);

  --color-link: rgb(0, 122, 223);

  --font-size: 18px;
  --line-height: 26px;

  --font-weight-heading: 400;
  --font-size-h1: 30px;
  --font-size-h2: 24px;
  --font-size-h3: 20px;
  --font-size-h4: 18px;

  --color-image-placeholder: rgba(0, 0, 0, 0.1);

  --animation-duration: 0.15s;
  --animation-type: ease-in-out;
}

@media (min-width: 768px) {
  :root {
    --line-height: 28px;
  }
}

/**
 * Support from dark appearance.
 */
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #171717;
    --color-background-feature: #141414;
    --color-background-feature-hover: #101010;
    --color-background-shortcut: rgba(255, 255, 255, 0.1);

    --color-text: #e7e7e7;
    --color-text-secondary: #666;
    --color-text-shortcut: color: rgba(255, 255, 255, 0.6);

    --color-border-feature: #242424;
    --color-border-divider: #242424;

    --color-image-placeholder: rgba(255, 255, 255, 0.1);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, Calibri, source-sans-pro, sans-serif;
  font-size: var(--font-size);
  line-height: var(--line-height);
}

/* Use antialised font rendering on dark mode, because otherwise white text on black background
   appears so bold. */
@media (prefers-color-scheme: dark) {
  body {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
  }
}

/**
 * Logo
 */
.logo {
  width: 24px;
  height: auto;
  margin-right: 10px;
  margin-bottom: -1px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

/**
 * Sections.
 */
section,
.footer-container {
  width: 100%;
  margin: 20px 0;
  padding: 15px;

  /* clearfix */
  content: "";
  display: table;
  clear: both;
}

section.main {
  text-align: center;
}

/**
 * Headings.
 */
h1,
h2,
h3,
h4 {
  font-weight: var(--font-weight-heading);
  line-height: initial;
}

h1 {
  font-size: var(--font-size-h1);
  margin-bottom: 30px;
}

h2 {
  font-size: var(--font-size-h2);
}

h3 {
  font-size: var(--font-size-h3);
}

h4 {
  font-size: var(--font-size-h4);
}

h3 a,
h3 a:visited,
h3 a:active {
  text-decoration: none;
  color: var(--color-text);
}

h1.white,
h2.white {
  color: #fff;
}

.rwd-line {
  display: block;
}

/**
 * Links.
 */
a, #expand-all {
  transition: color var(--animation-duration) var(--animation-type),
              border var(--animation-duration) var(--animation-type),
              background var(--animation-duration) var(--animation-type),
              opacity var(--animation-duration) var(--animation-type);
}
a, a:visited, a:active,
#expand-all:not(.expanded) {
  color: var(--color-link);
}
.call-to-action a.cta:hover {
  color: #fff;
}
a:not(.cta):hover,
#expand-all:not(.expanded):hover {
  opacity: 0.6;
}
#expand-all:not(.expanded) {
  cursor: pointer;
}

.secondary-links a {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/**
 * Text contents.
 */
section p strong {
  font-weight: 500;
}
section p sup {
  font-size: 12px;
}

/* Highlight keyboard shortcut. */
.kbs {
  font-size: 14px;
  color: var(--color-text-shortcut);
  background: var(--color-background-shortcut);
  border-radius: 6px;
  padding: 2px 6px 4px;
  margin: 0 1px;
  white-space: nowrap;
}
.kbs:hover {
  opacity: 0.8;
}
/* Highlight menu. */
.menu {
  font-size: 16px;
  color: var(--color-text-shortcut);
  background: var(--color-background-shortcut);
  border-radius: 6px;
  padding: 2px 6px 4px;
  margin: 0 1px;
  white-space: break-spaces;
}
.menu:hover {
  opacity: 0.8;
}

.change-history {
  margin: 50px 0;
}

/**
 * Collapsible elements.
 */
.collapsible:first-of-type {
  margin-top: 30px;
}
.collapsible .content {
  position: relative;
  display: none;
  font-size: 16px;
  line-height: 24px;
}
.collapsible h4 {
  display: block;
  position: relative;
  padding-left: 20px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.collapsible h4::before {
  display: inline-block;
  content: '+';
  width: 10px;
  height: 10px;
  position: absolute;
  top: -1px;
  left: 0px;
  margin-right: 10px;
}
.collapsible.open .content {
  position: relative;
}
.collapsible.open .content::before {
  position: absolute;
  display: inline-block;
  content: "";
  width: 4px;
  height: calc(100% - 8px);
  left: 2px;
  top: 4px;
  background-color: var(--color-heading-border);
  border-radius: 10px;
}
.collapsible.open h4 {
  margin-bottom: 0px;
}
.collapsible.open h4::before {
  content: '-';
}
.collapsible.open .content {
  display: block;
  padding-left: 20px;
}

/**
 * Footnotes.
 */
section.footnotes,
section.technical {
  margin-bottom: 40px;
}

section.footnotes h2,
section.technical h2 {
  font-size: 30px;
}

section.footnotes ol,
section.call-to-action p,
section.technical ul {
  color: var(--color-text);
  font-size: 14px;
}

/* Sup elements only used for footnotes. */
sup {
  line-height: 100%;
  vertical-align: top;
}

a.footnote-indicator,
a.footnote-indicator:visited {
  color: var(--color-text-secondary);
  opacity: 0.5;
  text-decoration: none;
}
a.footnote-indicator:hover {
  opacity: 0.3;
}

section.footnotes ol {
  padding: 0;
  padding-left: 20px;
  color: var(--color-text-secondary);
}

/**
 * Footer.
 */
.footer-container {
  margin-top: 0;
  margin-bottom: 0;
}
.footer-container .secondary-links a {
  display: inline;
  float: left;
  clear: left;
  margin-bottom: 5px;
  color: #aaa;
}
p.copyright {
  font-size: 10px;
  color: var(--color-text-secondary);
  float: left;
  clear: left;
}
p.copyright a {
  color: #aaa;
}

/**
 * Bigger mobile devices and upwards.
 */
@media (min-width: 460px) {

  .feature-highlights {
    grid-template-columns: 1fr 1fr;
    margin: 0 20px;
  }

}

/**
 * Tablet and upwards.
 */
@media (min-width: 768px) {

  :root {
    --font-size-h1: 52px;
    --font-size-h2: 40px;
    --font-size-h3: 24px;
  }

   /**
    * Logo
    */
  .logo {
    width: 40px;
    height: auto;
    margin-right: 20px;
    margin-bottom: -2px;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.15));
  }

  .footer-container .secondary-links {
    float: left;
  }
  .footer-container .copyright {
    float: right;
    clear: none;
  }
  .footer-container .secondary-links a {
   float: none;
   margin-bottom: 0;
   margin-right: 10px;
  }
  .footer-container .copyright {
    margin: 0;
  }

}

/**
 * Desktop and upwards.
 */
@media (min-width: 1024px) {

  :root {
    --font-size-h3: 26px;
  }

  section,
  .footer-container {
    width: 80%;
    max-width: 1154px;
    margin: 80px auto 80px;
  }

  section.privacy-policy h1, section.privacy-policy h2, section.privacy-policy h3, section.privacy-policy p,
  section.terms h1, section.terms h2, section.terms h3, section.terms p,
  section.support h1, section.support h2, section.support h3, section.support p,
  .change-history {
    max-width: 820px;
  }


  .footer-container {
    margin-top: 0;
    margin-bottom: 0;
  }

}
