/* ==========================================================================
   WORX-style design system (adapted for Tensorvest)
   Palette, typography, layout and components mirror the styling used on
   https://worx.africa/cooperative/privacy_policy/
   ========================================================================== */

:root {
  --rgb-black: 0, 0, 0;
  --rgb-blue: 0, 100, 230;
  --rgb-blue-dark: 0, 55, 115;
  --rgb-blue-darker: 0, 40, 218;
  --rgb-blue-light: 194, 246, 255;
  --rgb-blue-lighter: 242, 247, 254;
  --rgb-green: 0, 177, 50;
  --rgb-green-dark: 0, 159, 18;
  --rgb-grey: 52, 70, 86;
  --rgb-grey-dark: 15, 33, 50;
  --rgb-grey-light: 100, 127, 148;
  --rgb-grey-lighter: 244, 246, 247;
  --rgb-white: 255, 255, 255;

  --color-black: rgb(var(--rgb-black));
  --color-blue: rgb(var(--rgb-blue));
  --color-blue-dark: rgb(var(--rgb-blue-dark));
  --color-blue-darker: rgb(var(--rgb-blue-darker));
  --color-blue-light: rgb(var(--rgb-blue-light));
  --color-blue-lighter: rgb(var(--rgb-blue-lighter));
  --color-green: rgb(var(--rgb-green));
  --color-green-dark: rgb(var(--rgb-green-dark));
  --color-grey: rgb(var(--rgb-grey));
  --color-grey-dark: rgb(var(--rgb-grey-dark));
  --color-white: rgb(var(--rgb-white));

  --font-size: clamp(1.375rem, 2.225vw, 2rem);
  --letter-spacing: -0.0015em;
  --line-height: 1.3;
  --transition: 0.15s cubic-bezier(0.33, 1, 0.68, 1);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

html,
body,
div,
span,
applet,
button,
input,
select,
textarea,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
main,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  background: rgba(0, 0, 0, 0);
  border: 0;
  font: inherit;
  font-size: 100%;
  margin: 0;
  min-width: 0;
  outline: 0;
  padding: 0;
  vertical-align: baseline;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section {
  display: block;
}

ol,
ul,
menu {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: none;
}

img,
svg {
  display: block;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
  background: var(--color-blue);
  font-size: 16px;
  min-height: -webkit-fill-available;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--font-size) * 3.4);
}

html.zoom-active {
  overflow: hidden;
}

body {
  background: var(--color-blue);
  color: var(--color-blue-light);
  display: flex;
  flex-direction: column;
  font-family: "Family", Charter, "Bitstream Charter", "Sitka Text", Cambria,
    Georgia, serif;
  font-feature-settings: "liga", "dlig";
  font-size: var(--font-size);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-style: normal;
  font-weight: 400;
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
  min-height: 100vh;
  -webkit-tap-highlight-color: rgba(var(--rgb-blue-light), 0);
  text-rendering: optimizeLegibility;
}

@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }
}

a {
  color: var(--color-white);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.0625em;
}

b,
strong {
  color: var(--color-white);
  font-weight: 700;
  letter-spacing: normal;
}

i,
em {
  font-style: italic;
}

img,
source,
video {
  height: auto;
  max-width: 100%;
  width: 100%;
}

.uppercase {
  font-feature-settings: "case", "liga", "dlig";
  letter-spacing: normal;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav-active {
  display: none;
}

.nav-active:checked ~ .nav-underlay,
.nav-active:checked ~ .nav .nav__links dd {
  display: flex;
}

@media (min-width: 64em) {
  .nav-active:checked ~ .nav-underlay {
    display: none;
  }
}

.nav-underlay {
  background: rgba(var(--rgb-blue), 0.92);
  display: none;
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

@media (min-width: 64em) {
  .nav-underlay {
    display: none;
  }
}

.nav {
  display: flex;
  flex-direction: column;
  margin-bottom: 3.55em;
  margin-top: 3.55em;
}

.nav__main {
  display: flex;
  flex: 1;
  gap: 1em;
  margin-inline: auto;
  padding-left: 1.5em;
  padding-right: 1.5em;
  width: min(100%, 34.5em);
}

.nav__body {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5125em;
  margin-top: 0.5125em;
  width: 100%;
}

.nav__logo {
  display: flex;
  flex-shrink: 0;
}

.nav__logo a {
  align-items: center;
  color: var(--color-white);
  display: flex;
  gap: 0.225em;
  height: 1.375em;
  text-decoration: none;
}

.nav__logo a svg,
.nav__logo a img {
  height: 1.375em;
  max-height: 1.375em;
  width: auto;
}

.nav__logo a span {
  color: var(--color-white);
  display: block;
  font-family: "Inter Display", "Inter", sans-serif;
  font-feature-settings: "case", "cpsp", "ss03";
  font-size: 50%;
  font-weight: 700;
  letter-spacing: 0.0225em;
  line-height: 1;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  flex: 1;
  flex-direction: column;
  font-family: "Inter", sans-serif;
  font-feature-settings: "case", "liga", "dlig", "ss03";
  line-height: 1.375em;
  white-space: nowrap;
}

.nav__links dt,
.nav__links dd {
  display: flex;
  font-size: 50%;
}

.nav__links dt a,
.nav__links dd a {
  text-decoration: none;
}

.nav__links dt {
  font-weight: 700;
}

.nav__links dt a {
  color: var(--color-white);
}

.nav__links dt::before {
  color: rgba(var(--rgb-blue-light), 0.3);
  content: "/";
  display: inline-flex;
  font-weight: 600;
  justify-content: center;
  width: 1em;
}

.nav__links dd {
  display: none;
}

.nav__links dd a {
  color: rgba(var(--rgb-blue-light), 0.85);
  cursor: pointer;
  flex: 1;
  font-weight: 400;
  margin-left: 1.375em;
}

.nav__links dd.selected a {
  color: var(--color-white);
}

.nav__toggle {
  display: flex;
  height: 1.375em;
  line-height: 1.375em;
  -webkit-user-select: none;
}

.nav__toggle label {
  color: var(--color-white);
  cursor: pointer;
  font-family: "Inter Display", "Inter", sans-serif;
  font-feature-settings: "case", "cpsp", "ss03";
  font-size: 50%;
  font-weight: 700;
  letter-spacing: 0.0225em;
  margin-right: -1em;
  padding-left: 1em;
  padding-right: 1em;
}

.nav--product {
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  background: rgba(var(--rgb-blue-dark), 0.3);
  box-shadow: 0 1px 0 0 rgba(var(--rgb-blue-dark), 0.3);
  left: 0;
  margin: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

.nav--product .nav__main {
  padding-left: 1em;
  padding-right: 1em;
  width: min(100%, 29em);
}

@media (hover: hover) {
  .nav__links dt a:focus,
  .nav__links dt a:hover,
  .nav__links dd:not(.selected) a:focus,
  .nav__links dd:not(.selected) a:hover,
  .nav__links dd label:focus,
  .nav__links dd label:hover,
  .nav__toggle label:focus,
  .nav__toggle label:hover {
    color: var(--color-white);
    text-decoration: underline;
  }
}

@media (min-width: 64em) {
  .nav__main {
    padding-left: 2em;
    padding-right: 2em;
  }

  .nav__body {
    align-items: center;
    flex: 1;
    /* gap: 0.1em; */
    margin-right: 3.25em;
    min-width: 0;
    width: auto;
  }

  .nav__links {
    flex-direction: row;
    flex-shrink: 0;
    gap: 0.725em;
    justify-content: flex-end;
    line-height: 1.375em;
    margin-right: 0.3em;
    min-width: 0;
  }

  .nav__links dt {
    margin-right: auto;
  }

  .nav__links dd {
    display: flex;
  }

  .nav__links dd a {
    margin-left: 0;
  }

  .nav__toggle {
    display: none;
  }

  .nav--product .nav__main {
    gap: 0;
    padding-left: 3em;
    padding-right: 3em;
    width: min(100%, 46em);
  }

  .nav--product .nav__main::after {
    content: "";
    flex-shrink: 1;
    min-width: 0;
    width: 12em;
  }

  /* Auth pill sits after the nav links: never let it collapse onto them */
  .nav__auth,
  .nav__auth--signed-in {
    flex-shrink: 0;
    margin-left: 0;
  }
}

/* --------------------------------------------------------------------------
   Main / product layout
   -------------------------------------------------------------------------- */

.main {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-bottom: 3.075em;
  margin-inline: auto;
  padding-left: 1.5em;
  padding-right: 1.5em;
  width: min(100%, 34.5em);
}

.main--product {
  margin-bottom: 3.55em;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

@media (min-width: 64em) {
  .main {
    padding-left: 2em;
    padding-right: 2em;
  }

  .main--product {
    padding-left: 0;
    padding-right: 0;
  }
}

.product {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3.25em;
  margin-inline: auto;
  margin-top: 3.4em;
  padding-left: 1em;
  padding-right: 1em;
  width: min(100%, 29em);
}

.product__body {
  display: flex;
  flex-direction: column;
  gap: 3.25em;
  order: 1;
}

/* Document body: cancel the column gap so long-form sections sit close
   together, exactly like the source page's inline offsets */
.product__body--sections > * + * {
  margin-top: -3.5rem;
}

.product__header {
  margin-top: -0.375em;
}

.product__header h1,
.product__header h2 {
  color: var(--color-white);
  letter-spacing: normal;
}

.product__header h1 {
  align-items: flex-start;
  display: flex;
  font-size: 220%;
  font-weight: 800;
  line-height: 1;
}

.product__header h1 .version {
  margin-left: 0.125em;
  margin-top: 0.175em;
}

.product__header h2 {
  --spacing: 0.575em;
  font-size: 140%;
  font-weight: 500;
  line-height: 1.2;
}

.product__header a {
  color: var(--color-white);
  text-decoration-thickness: from-font;
}

.product__header > * + * {
  margin-top: var(--spacing, 0.9em);
}

.product__content {
  flex: 1;
  margin-top: -0.3em;
}

.product__content h3,
.product__content h4 {
  color: var(--color-white);
  font-family: "Inter Display", "Inter", sans-serif;
  font-feature-settings: "liga", "dlig", "ss03";
  font-weight: 700;
  letter-spacing: normal;
}

.product__content h3 a,
.product__content h4 a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.product__content h3 {
  font-size: 110%;
}

.product__content h3 + * {
  --spacing: 0.5875em;
}

.product__content h4 {
  --spacing: 1.475em;
  font-size: 75%;
}

.product__content h4 + * {
  --spacing: 0.325em;
}

.product__content ol,
.product__content ul {
  display: flex;
  flex-direction: column;
  gap: 0.575em;
  padding-left: 1em;
}

/* Markers sit inside the item's own indent (not hanging outside it), so
   bullets and numbers line up with the text they introduce */
.product__content ol li,
.product__content ul li {
  padding-left: 1.25em;
  position: relative;
}

.product__content ol li {
  padding-left: 1.75em;
}

.product__content ol li::before,
.product__content ul li::before {
  font-feature-settings: "case", "tnum";
  left: 0;
  position: absolute;
  text-align: left;
  top: 0;
  width: auto;
}

.product__content ol {
  counter-reset: counter;
}

.product__content ol li {
  counter-increment: counter;
}

.product__content ol li::before {
  content: counter(counter) ".";
}

.product__content ul li::before {
  content: "\2022";
}

.product__content > * + * {
  margin-top: var(--spacing, 0.975em);
}

.product__aside {
  order: 0;
}

@media (min-width: 64em) {
  .product {
    flex-direction: row;
    gap: 0;
    margin-top: 0;
    padding-left: 3em;
    padding-right: 3em;
    justify-content: space-between;
    width: min(100%, 46em);
  }

  .product__body {
    flex: 1;
    margin-top: 5.95em;
    margin-right: 3.25em;
    order: 0;
  }

  .product__aside {
    margin-top: 0;
    order: 1;
    width: 12em;
  }
}

/* --------------------------------------------------------------------------
   Buy card
   -------------------------------------------------------------------------- */

.buy {
  display: flex;
  flex-direction: column;
  gap: 1.1em;
  margin-inline: auto;
  pointer-events: auto;
  width: min(100%, 20em);
}

.buy__tab {
  background: var(--color-blue-lighter);
  border-radius: 0.4em;
  box-shadow: 0 0 0 1px rgba(var(--rgb-black), 0.1),
    0 0.1em 2.8em -0.8em rgba(var(--rgb-black), 0.1),
    0 0.2em 3.2em -1.2em rgba(var(--rgb-black), 0.2),
    0 0.4em 2em -1.2em rgba(var(--rgb-black), 0.3),
    0 0.6em 2.4em -1.6em rgba(var(--rgb-black), 0.4),
    0 0.8em 2.8em -2em rgba(var(--rgb-black), 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.buy__header {
  align-items: center;
  background: var(--color-white);
  box-shadow: 0 1px 0 0 rgba(var(--rgb-blue), 0.1);
  display: flex;
  gap: 0.3em;
  height: 2.4em;
  margin-bottom: 1.1em;
  overflow: hidden;
  padding-left: 0.9em;
  padding-right: 0.9em;
}

.buy__header figure {
  width: 1.3em;
}

.buy__header dl {
  align-items: center;
  color: var(--color-black);
  display: flex;
  flex: 1;
  font-family: "Inter Display", "Inter", sans-serif;
  font-feature-settings: "case", "liga", "dlig", "ss03";
  font-size: 70%;
  font-weight: 700;
  justify-content: space-between;
  line-height: 1;
}

.buy__content {
  color: var(--color-black);
  font-family: "Inter", sans-serif;
  font-feature-settings: "liga", "dlig", "ss03";
  font-weight: 400;
  line-height: 1.5;
  margin: -0.16em 1.1em -0.185em 1.1em;
}

.buy__content h4 {
  font-size: 55%;
  font-weight: 700;
}

.buy__content h4 + * {
  --spacing: 0.425em;
}

.buy__content p {
  font-size: 50%;
}

.buy__content ul {
  display: flex;
  flex-direction: column;
  font-size: 50%;
  gap: 0.3em;
  padding-left: 0.75em;
}

/* Indented bullet markers, matching the policy body lists */
.buy__content ul li {
  padding-left: 0.8em;
  position: relative;
}

.buy__content ul li::before {
  content: "\2022";
  font-feature-settings: "case", "tnum";
  left: 0;
  position: absolute;
  top: 0;
}

.buy__content a {
  color: var(--color-blue);
  text-decoration: none;
}

.buy__content b,
.buy__content strong {
  color: var(--color-black);
  letter-spacing: inherit;
}

.buy__content > * + * {
  margin-top: var(--spacing, 1.3em);
}

.buy__button {
  display: flex;
  flex-direction: column;
  margin: 1.1em 0.3em 0.3em 0.3em;
}

.buy__button a {
  background: linear-gradient(
    0deg,
    var(--color-green-dark) 0,
    var(--color-green) 100%
  );
  border-radius: 0.25em;
  box-shadow: inset 0 0 0 1px rgba(var(--rgb-black), 0.05),
    inset 0 2px 0 0 rgba(var(--rgb-white), 0.15);
  cursor: pointer;
  display: flex;
  justify-content: center;
  text-decoration: none;
}

.buy__button a span {
  color: var(--color-white);
  font-family: "Inter Display", "Inter", sans-serif;
  font-feature-settings: "case", "liga", "dlig", "ss03";
  font-size: 65%;
  font-weight: 700;
  line-height: 1em;
  padding: 1.175em;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(var(--rgb-black), 0.05);
}

.buy__notes {
  font-family: "Inter", sans-serif;
  font-feature-settings: "liga", "dlig", "ss03";
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: -0.1675em;
  margin-top: -0.1925em;
  text-align: center;
}

.buy__notes p {
  font-size: 50%;
}

.buy__notes a {
  text-decoration: none;
}

.buy__notes span {
  display: inline-block;
}

@media (hover: hover) {
  .buy__content a:focus,
  .buy__content a:hover,
  .buy__notes a:focus,
  .buy__notes a:hover {
    text-decoration: underline;
  }

  .buy__button a {
    transition: box-shadow var(--transition);
  }

  .buy__button a span {
    transition: text-shadow var(--transition);
  }

  .buy__button a:focus,
  .buy__button a:hover {
    box-shadow: inset 0 0 0 1px rgba(var(--rgb-black), 0.1),
      inset 0 2px 0 0 rgba(var(--rgb-white), 0.15),
      inset 0 0.6em 1.3em -0.9em rgba(var(--rgb-white), 0.25);
  }

  .buy__button a:focus span,
  .buy__button a:hover span {
    text-shadow: 0 1px 0 rgba(var(--rgb-black), 0.15);
  }
}

@media (min-width: 64em) {
  .buy {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 101;
  }

  .buy__tab {
    border-radius: 0 0 0.4em 0.4em;
  }
}

/* --------------------------------------------------------------------------
   Legal / footer
   -------------------------------------------------------------------------- */

.legal {
  display: flex;
  flex-direction: column;
  margin-bottom: 3.55em;
  margin-inline: auto;
  padding-left: 1.5em;
  padding-right: 1.5em;
  width: min(100%, 34.5em);
}

.legal p {
  font-family: "Inter", sans-serif;
  font-feature-settings: "liga", "dlig", "ss03";
  font-size: 50%;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: -0.325em;
  margin-top: 0.1em;
}

.legal p a,
.legal p b {
  color: var(--color-white);
  font-weight: 700;
  text-decoration: none;
}

.legal--product {
  margin-bottom: 0;
  margin-inline: initial;
  margin-top: -0.175em;
  padding-left: 0;
  padding-right: 0;
  width: auto;
}

@media (hover: hover) {
  .legal a:focus,
  .legal a:hover {
    text-decoration: underline;
  }
}

@media (min-width: 48em) {
  .legal span {
    display: inline-block;
  }
}

@media (min-width: 64em) {
  .legal {
    padding-left: 2em;
    padding-right: 2em;
  }

  .legal p {
    font-size: 40%;
  }

  .legal--product {
    padding-left: 0;
    padding-right: 0;
  }
}

/* --------------------------------------------------------------------------
   Auth slot (Tensorvest specific, styled in the WORX idiom)
   -------------------------------------------------------------------------- */

.nav__auth {
  align-items: center;
  display: none;
  font-family: "Inter", sans-serif;
  font-size: 50%;
  font-weight: 700;
  line-height: 1.375em;
  margin-left: 1em;
  white-space: nowrap;
}

@media (min-width: 30em) {
  .nav__auth {
    display: flex;
  }
}

.nav__auth a,
.nav__auth button {
  color: var(--color-white);
  text-decoration: none;
}

.nav__auth a {
  border: 1px solid rgba(var(--rgb-white), 0.35);
  border-radius: 1.7em;
  font-family: "Inter Display", "Inter", sans-serif;
  font-feature-settings: "case", "cpsp", "ss03";
  font-size: 90%;
  font-weight: 700;
  letter-spacing: 0.0225em;
  padding: 0.35em 1em 0.25em 1em;
  transition: background var(--transition), color var(--transition);
}

@media (hover: hover) {
  .nav__auth a:hover,
  .nav__auth a:focus {
    background: var(--color-white);
    color: var(--color-blue);
    text-decoration: none;
  }
}

.nav__auth--signed-in {
  align-items: center;
  display: none;
  gap: 0.5em;
  font-family: "Inter", sans-serif;
  font-size: 50%;
  font-weight: 400;
  line-height: 1.375em;
  margin-left: 1em;
  white-space: nowrap;
}

@media (min-width: 30em) {
  .nav__auth--signed-in {
    display: flex;
  }
}

.nav__auth--signed-in .nav__auth__email {
  color: var(--color-white);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12em;
}

.nav__auth--signed-in button {
  background: none;
  border: 1px solid rgba(var(--rgb-white), 0.35);
  border-radius: 1.7em;
  color: var(--color-white);
  cursor: pointer;
  font-family: "Inter Display", "Inter", sans-serif;
  font-feature-settings: "case", "cpsp", "ss03";
  font-size: 90%;
  font-weight: 700;
  letter-spacing: 0.0225em;
  padding: 0.35em 1em 0.25em 1em;
  transition: background var(--transition), color var(--transition);
}

@media (hover: hover) {
  .nav__auth--signed-in button:hover,
  .nav__auth--signed-in button:focus {
    background: var(--color-white);
    color: var(--color-blue);
  }
}

/* Guest-only affordances: hidden once the visitor is signed in */
.is-authenticated .buy__notes {
  display: none;
}

.is-authenticated .nav__links dd.mobile-only {
  display: none !important;
}

/* Mobile-only nav entry: hidden once the inline nav is used on large screens */
.nav__links dd.mobile-only {
  display: none;
}

@media (min-width: 64em) {
  .nav__links dd.mobile-only {
    display: none;
  }
}
